diff options
author | Silvio <silvio@socioambiental.org> | 2013-04-16 16:39:28 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2013-04-16 16:39:28 -0300 |
commit | c13da6b6d3741296c5dfb0f05c1508389f0552ba (patch) | |
tree | 5e18858f846facca9b62e4774c789978548b0915 | |
parent | b5b27b56421c21dbdd757c6fef41566eb2b94915 (diff) | |
download | gmap_arcgis_js-c13da6b6d3741296c5dfb0f05c1508389f0552ba.tar.gz gmap_arcgis_js-c13da6b6d3741296c5dfb0f05c1508389f0552ba.tar.bz2 |
Commit adding selectToUISlider support
-rw-r--r-- | gmap_arcgis.js | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 1dfd329..5a52859 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -392,18 +392,30 @@ function gmapArcgis(config) { // jQuery slider wrapper slider: function(element, slider) { var self = this; + var type = (self.config.sliders[slider].type != undefined) ? self.config.sliders[slider].type : 'slider'; - // Max is the number of layers in the service - $(element).slider({ - value: 1, - min: -1, - max: 11, - step: 1, - animate: true, - change: function(event, ui) { - self.sliderUpdate.apply(self, [ ui.value, slider ]); - }, - }); + if (type == 'selectToUISlider') { + $(element).selectToUISlider({ + sliderOptions: { + slide: function(event, ui) { + self.sliderUpdate.apply(self, [ ui.value, slider ]); + } + } + }).hide(); + } + else { + // Max is the number of layers in the service + $(element).slider({ + value: 1, + min: -1, + max: 11, + step: 1, + animate: true, + change: function(event, ui) { + self.sliderUpdate.apply(self, [ ui.value, slider ]); + }, + }); + } }, /** |