diff options
author | tommy tomson <thomas.bierey@gmx.de> | 2012-05-11 16:41:16 +0200 |
---|---|---|
committer | tommy tomson <thomas.bierey@gmx.de> | 2012-05-11 16:41:16 +0200 |
commit | 48c48d644f4b6dca237e61594d5d95a0c1c3f6e8 (patch) | |
tree | 6116903d1172c0b8b0c7f1eabefa0806af151448 /view/theme/diabook/js/jquery.mapquery.mqLayerManager.js | |
parent | 74e79a06a8987cda06951cee863b9b3e61cdc9f9 (diff) | |
download | volse-hubzilla-48c48d644f4b6dca237e61594d5d95a0c1c3f6e8.tar.gz volse-hubzilla-48c48d644f4b6dca237e61594d5d95a0c1c3f6e8.tar.bz2 volse-hubzilla-48c48d644f4b6dca237e61594d5d95a0c1c3f6e8.zip |
diabook-theme: update mapquery and small fix
Diffstat (limited to 'view/theme/diabook/js/jquery.mapquery.mqLayerManager.js')
-rw-r--r-- | view/theme/diabook/js/jquery.mapquery.mqLayerManager.js | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js b/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js index 22dec2170..885330cf1 100644 --- a/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js +++ b/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js @@ -111,7 +111,7 @@ $.widget("mapQuery.mqLayerManager", { var element = checkbox.parents('.mq-layermanager-element'); var layer = element.data('layer'); var self = element.data('self'); - self._visible(layer,checkbox.attr('checked')); + self._visible(layer,checkbox.is(':checked')); }); element.delegate('.ui-icon-closethick', 'click', function() { @@ -120,11 +120,11 @@ $.widget("mapQuery.mqLayerManager", { }); //binding events - map.bind("mqAddLayer", + map.bind("addlayer", {widget:self,control:lmElement}, self._onLayerAdd); - map.bind("mqRemoveLayer", + map.bind("removelayer", {widget:self,control:lmElement}, self._onLayerRemove); @@ -286,23 +286,16 @@ $.widget("mapQuery.mqLayerManager", { evt.data.widget._layerAdded(evt.data.control,layer); }, - _onLayerRemove: function(evt, id) { - evt.data.widget._layerRemoved(evt.data.control,id); + _onLayerRemove: function(evt, layer) { + evt.data.widget._layerRemoved(evt.data.control,layer.id); }, - _onLayerChange: function(evt, data) { - var layer; - //since we don't know which layer we get we've to loop through - //the openlayers.layer.ids to find the correct one - $.each(evt.data.map.layers(), function(){ - if(this.olLayer.id == data.layer.id) {layer=this;} - }); - //(name, order, opacity, params, visibility or attribution) - switch(data.property) { + _onLayerChange: function(evt, layer, property) { + switch(property) { case 'opacity': evt.data.widget._layerOpacity(evt.data.widget,layer); break; - case 'order': + case 'position': evt.data.widget._layerPosition(evt.data.widget,layer); break; case 'visibility': |