aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2015-08-11 15:42:42 -0300
committerSilvio <silvio@socioambiental.org>2015-08-11 15:42:42 -0300
commitb0eee1c694f12a08fa868f93587532c031a7b59b (patch)
treeb6928b85d0a19f39f1ffd3327d77d3d806f13ba9
parent37e19ad574393cf3612b26f1cd4bb31a910b8808 (diff)
downloadgmap_arcgis_js-b0eee1c694f12a08fa868f93587532c031a7b59b.tar.gz
gmap_arcgis_js-b0eee1c694f12a08fa868f93587532c031a7b59b.tar.bz2
Check if sliders is defined
-rw-r--r--gmap_arcgis.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index e804707..4cd0fab 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -551,6 +551,15 @@ function gmapArcgis(config) {
// jQuery slider wrapper
slider: function(element, slider) {
var self = this;
+
+ if (self.config.sliders == undefined) {
+ self.config.sliders = {};
+ }
+
+ if (self.config.sliders[slider] == undefined) {
+ self.config.sliders[slider] = {};
+ }
+
var type = (self.config.sliders[slider].type != undefined) ? self.config.sliders[slider].type : 'slider';
var value = (self.config.sliders[slider].value != undefined) ? self.config.sliders[slider].value : 1;
var min = (self.config.sliders[slider].min != undefined) ? self.config.sliders[slider].min : 1;