Skip to content
Snippets Groups Projects
Commit 7d246323 authored by Brandon Bergren's avatar Brandon Bergren
Browse files

JSLint run.

Remove unused variables.
parent a17f5f74
No related branches found
No related tags found
No related merge requests found
/* $Id$ */ /* $Id$ */
/** /**
* @file
* GMap Shape Loader * GMap Shape Loader
* Static Shapes. * Static Shapes.
* This is a simple marker loader to read markers from the map settings array. * This is a simple marker loader to read markers from the map settings array.
* Commonly used with macros. * Commonly used with macros.
*/ */
/*global $, Drupal */
// Add a gmap handler // Add a gmap handler
Drupal.gmap.addHandler('gmap', function(elem) { Drupal.gmap.addHandler('gmap', function (elem) {
var obj = this; var obj = this;
var shape, i;
if (obj.vars.shapes) { if (obj.vars.shapes) {
// Inject shapes during init. // Inject shapes during init.
obj.bind('init',function() { obj.bind('init', function () {
// We need to move the incoming shapes out of the way, // We need to move the incoming shapes out of the way,
// because addshape will readd them, causing an infinate loop. // because addshape will readd them, causing an infinate loop.
// Store the shapes in s and reset obj.vars.shapes. // Store the shapes in s and reset obj.vars.shapes.
var s = obj.vars.shapes; var s = obj.vars.shapes;
obj.vars.shapes = []; obj.vars.shapes = [];
$.each(s, function(i,shape) { $.each(s, function (i, shape) {
if (!shape.opts) {shape.opts = {};} if (!shape.opts) {
shape.opts = {};
}
// TODO: style props? // TODO: style props?
// And add it. // And add it.
obj.change('prepareshape',-1,shape); obj.change('prepareshape', -1, shape);
obj.change('addshape',-1,shape); obj.change('addshape', -1, shape);
}); });
obj.change('shapesready',-1); obj.change('shapesready', -1);
}); });
} }
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment