Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gmap
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
gmap
Commits
cd574958
Commit
cd574958
authored
16 years ago
by
Brandon Bergren
Browse files
Options
Downloads
Patches
Plain Diff
JSLint run.
== -> === changes. Remove unused variable.
parent
143426c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/align.js
+21
-15
21 additions, 15 deletions
js/align.js
with
21 additions
and
15 deletions
js/align.js
+
21
−
15
View file @
cd574958
/* $Id$ */
/* $Id$ */
/**
/**
* @file
* Alignment widget.
* Alignment widget.
* Applies CSS classes to a macro.
* Applies CSS classes to a macro.
*/
*/
////////////////////////////////////////
/*global $, Drupal */
// Align widget //
////////////////////////////////////////
Drupal
.
gmap
.
addHandler
(
'
align
'
,
function
(
elem
)
{
Drupal
.
gmap
.
addHandler
(
'
align
'
,
function
(
elem
)
{
var
obj
=
this
;
var
obj
=
this
;
// Respond to incoming alignment changes.
// Respond to incoming alignment changes.
var
binding
=
obj
.
bind
(
"
alignchange
"
,
function
(){
var
binding
=
obj
.
bind
(
"
alignchange
"
,
function
()
{
elem
.
value
=
obj
.
vars
.
align
;
elem
.
value
=
obj
.
vars
.
align
;
});
});
// Send out outgoing alignment changes.
// Send out outgoing alignment changes.
$
(
elem
).
change
(
function
()
{
$
(
elem
).
change
(
function
()
{
obj
.
vars
.
align
=
elem
.
value
;
obj
.
vars
.
align
=
elem
.
value
;
obj
.
change
(
"
alignchange
"
,
binding
);
obj
.
change
(
"
alignchange
"
,
binding
);
});
});
});
});
Drupal
.
gmap
.
addHandler
(
'
gmap
'
,
function
(
elem
)
{
Drupal
.
gmap
.
addHandler
(
'
gmap
'
,
function
(
elem
)
{
var
obj
=
this
;
var
obj
=
this
;
// Respond to incoming alignment changes.
// Respond to incoming alignment changes.
var
binding
=
obj
.
bind
(
"
alignchange
"
,
function
()
{
obj
.
bind
(
"
alignchange
"
,
function
()
{
var
cont
=
obj
.
map
.
getContainer
();
var
cont
=
obj
.
map
.
getContainer
();
$
(
cont
)
$
(
cont
)
.
removeClass
(
'
gmap-left
'
)
.
removeClass
(
'
gmap-left
'
)
.
removeClass
(
'
gmap-center
'
)
.
removeClass
(
'
gmap-center
'
)
.
removeClass
(
'
gmap-right
'
);
.
removeClass
(
'
gmap-right
'
);
if
(
obj
.
vars
.
align
==
'
Left
'
)
{
$
(
cont
).
addClass
(
'
gmap-left
'
);}
if
(
obj
.
vars
.
align
===
'
Left
'
)
{
if
(
obj
.
vars
.
align
==
'
Center
'
)
{
$
(
cont
).
addClass
(
'
gmap-center
'
);}
$
(
cont
).
addClass
(
'
gmap-left
'
);
if
(
obj
.
vars
.
align
==
'
Right
'
)
{
$
(
cont
).
addClass
(
'
gmap-right
'
);}
}
if
(
obj
.
vars
.
align
===
'
Center
'
)
{
$
(
cont
).
addClass
(
'
gmap-center
'
);
}
if
(
obj
.
vars
.
align
===
'
Right
'
)
{
$
(
cont
).
addClass
(
'
gmap-right
'
);
}
});
});
// Send out outgoing alignment changes.
// Send out outgoing alignment changes.
// N/A
// N/A
obj
.
bind
(
'
buildmacro
'
,
function
(
add
)
{
obj
.
bind
(
'
buildmacro
'
,
function
(
add
)
{
if
(
obj
.
vars
.
align
&&
obj
.
vars
.
align
!=
'
None
'
)
{
if
(
obj
.
vars
.
align
&&
obj
.
vars
.
align
!=
=
'
None
'
)
{
add
.
push
(
'
align=
'
+
obj
.
vars
.
align
);
add
.
push
(
'
align=
'
+
obj
.
vars
.
align
);
}
}
});
});
});
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment