[fusion-commits] r2169 - in sandbox/jxlib-3.0: layers widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed May 26 14:53:34 EDT 2010
Author: madair
Date: 2010-05-26 14:53:32 -0400 (Wed, 26 May 2010)
New Revision: 2169
Modified:
sandbox/jxlib-3.0/layers/Layers.js
sandbox/jxlib-3.0/widgets/LayerManager.js
Log:
remove layers from the layer tree when deleting a layer
Modified: sandbox/jxlib-3.0/layers/Layers.js
===================================================================
--- sandbox/jxlib-3.0/layers/Layers.js 2010-05-26 15:38:16 UTC (rev 2168)
+++ sandbox/jxlib-3.0/layers/Layers.js 2010-05-26 18:53:32 UTC (rev 2169)
@@ -424,6 +424,17 @@
}
}
return null;
+ },
+
+ deleteLayer: function(uniqueId) {
+ for (var i=0; i<this.layers.length; i++) {
+ if (this.layers[i]['uniqueId'] == uniqueId) {
+ this.layers.splice(i,1);
+ }
+ }
+ for (var i=0; i<this.groups.length; i++) {
+ this.groups[i].deleteLayer(uniqueId);
+ }
}
});
Modified: sandbox/jxlib-3.0/widgets/LayerManager.js
===================================================================
--- sandbox/jxlib-3.0/widgets/LayerManager.js 2010-05-26 15:38:16 UTC (rev 2168)
+++ sandbox/jxlib-3.0/widgets/LayerManager.js 2010-05-26 18:53:32 UTC (rev 2169)
@@ -307,6 +307,8 @@
// console.log("deleteLayer");
var targetLI = (new Event(ev)).target.parentNode;
$(targetLI).dispose();
+
+ this.oMap.layerRoot.deleteLayer(layer.uniqueId);
this.updateLayer(layer.oMap);
},
More information about the fusion-commits
mailing list