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
7d246323
Commit
7d246323
authored
16 years ago
by
Brandon Bergren
Browse files
Options
Downloads
Patches
Plain Diff
JSLint run.
Remove unused variables.
parent
a17f5f74
No related branches found
Branches containing commit
Tags
6.x-2.0-beta1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/shapeloader_static.js
+12
-8
12 additions, 8 deletions
js/shapeloader_static.js
with
12 additions
and
8 deletions
js/shapeloader_static.js
+
12
−
8
View file @
7d246323
/* $Id$ */
/**
* @file
* GMap Shape Loader
* Static Shapes.
* This is a simple marker loader to read markers from the map settings array.
* Commonly used with macros.
*/
/*global $, Drupal */
// Add a gmap handler
Drupal
.
gmap
.
addHandler
(
'
gmap
'
,
function
(
elem
)
{
Drupal
.
gmap
.
addHandler
(
'
gmap
'
,
function
(
elem
)
{
var
obj
=
this
;
var
shape
,
i
;
if
(
obj
.
vars
.
shapes
)
{
// Inject shapes during init.
obj
.
bind
(
'
init
'
,
function
()
{
obj
.
bind
(
'
init
'
,
function
()
{
// We need to move the incoming shapes out of the way,
// because addshape will readd them, causing an infinate loop.
// Store the shapes in s and reset obj.vars.shapes.
var
s
=
obj
.
vars
.
shapes
;
obj
.
vars
.
shapes
=
[];
$
.
each
(
s
,
function
(
i
,
shape
)
{
if
(
!
shape
.
opts
)
{
shape
.
opts
=
{};}
$
.
each
(
s
,
function
(
i
,
shape
)
{
if
(
!
shape
.
opts
)
{
shape
.
opts
=
{};
}
// TODO: style props?
// And add it.
obj
.
change
(
'
prepareshape
'
,
-
1
,
shape
);
obj
.
change
(
'
addshape
'
,
-
1
,
shape
);
obj
.
change
(
'
prepareshape
'
,
-
1
,
shape
);
obj
.
change
(
'
addshape
'
,
-
1
,
shape
);
});
obj
.
change
(
'
shapesready
'
,
-
1
);
obj
.
change
(
'
shapesready
'
,
-
1
);
});
}
});
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