[Commits] r1047 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Thu Jun 11 22:29:16 CEST 2009
Author: tschaub
Date: 2009-06-11 22:29:16 +0200 (Thu, 11 Jun 2009)
New Revision: 1047
Modified:
apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
Duplicate r1046 for app trunk.
Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-06-11 20:28:00 UTC (rev 1046)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-06-11 20:29:16 UTC (rev 1047)
@@ -1054,10 +1054,11 @@
});
var map = this.mapPanel.map;
- var gx = this;
-
+ var control;
for (var i = 0, len = info.controls.length; i < len; i++){
- map.removeControl(info.controls[i]);
+ control = info.controls[i];
+ control.deactivate(); // TODO: remove when http://trac.openlayers.org/ticket/2130 is closed
+ control.destroy();
}
info.controls = [];
@@ -1068,14 +1069,17 @@
layers: [x.get("layer")],
eventListeners: {
getfeatureinfo: function(evt) {
- gx.displayPopup(evt, x.get("title") || x.get("name"));
+ this.displayPopup(evt, x.get("title") || x.get("name"));
},
- scope: gx
+ scope: this
}
});
map.addControl(control);
info.controls.push(control);
- });
+ if(infoButton.pressed) {
+ control.activate();
+ }
+ }, this);
};
this.mapPanel.layers.on("update", updateInfo, this);
More information about the Commits
mailing list