[Commits] r175 - sandbox/opengeo/drake/trunk/apps/drake
commits at geoext.org
commits at geoext.org
Tue Feb 17 19:14:48 CET 2009
Author: dwins
Date: 2009-02-17 19:14:48 +0100 (Tue, 17 Feb 2009)
New Revision: 175
Modified:
sandbox/opengeo/drake/trunk/apps/drake/index.html
Log:
Don't offer to zoom to bounds when the node being clicked is not a layer.
Modified: sandbox/opengeo/drake/trunk/apps/drake/index.html
===================================================================
--- sandbox/opengeo/drake/trunk/apps/drake/index.html 2009-02-17 17:26:02 UTC (rev 174)
+++ sandbox/opengeo/drake/trunk/apps/drake/index.html 2009-02-17 18:14:48 UTC (rev 175)
@@ -260,7 +260,7 @@
store: this.store,
displayInLayerSwitcher: false
}
- )
+ );
var baseLayer = new OpenLayers.Layer.WMS(
"OpenStreetMap",
@@ -482,17 +482,17 @@
});
this.layerTree.on("contextmenu", function(node, e){
- var menu = new Ext.menu.Menu([{
- id: "zoomtobounds",
- text: "Zoom to layer bounds",
- handler: function(evt){
- if (node.layer){
- this.map.zoomToExtent(node.layer.maxExtent);
- }
- },
- scope: this
- }]);
- menu.showAt(e.getPoint());
+ if (node.layer){
+ var menu = new Ext.menu.Menu([{
+ id: "zoomtobounds",
+ text: "Zoom to layer bounds",
+ handler: function(evt){
+ this.map.zoomToExtent(node.layer.maxExtent);
+ },
+ scope: this
+ }]);
+ menu.showAt(e.getPoint());
+ }
}, this);
this.layerTree.on("layeractivated", this.activateLayer, this);
More information about the Commits
mailing list