aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-04-16 16:39:28 -0300
committerSilvio <silvio@socioambiental.org>2013-04-16 16:39:28 -0300
commitc13da6b6d3741296c5dfb0f05c1508389f0552ba (patch)
tree5e18858f846facca9b62e4774c789978548b0915
parentb5b27b56421c21dbdd757c6fef41566eb2b94915 (diff)
downloadgmap_arcgis_js-c13da6b6d3741296c5dfb0f05c1508389f0552ba.tar.gz
gmap_arcgis_js-c13da6b6d3741296c5dfb0f05c1508389f0552ba.tar.bz2
Commit adding selectToUISlider support
-rw-r--r--gmap_arcgis.js34
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 ]);
+ },
+ });
+ }
},
/**