[Commits] r1212 - apps/opengeo/geoexplorer/trunk/src/script/app
commits at geoext.org
commits at geoext.org
Thu Jul 2 23:51:03 CEST 2009
Author: tschaub
Date: 2009-07-02 23:51:03 +0200 (Thu, 02 Jul 2009)
New Revision: 1212
Modified:
apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
Log:
If the visible background layer is dragged out of the background group, we have to make a new layer in that group visible.
Modified: apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js 2009-07-02 21:43:13 UTC (rev 1211)
+++ apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js 2009-07-02 21:51:03 UTC (rev 1212)
@@ -557,6 +557,18 @@
update: function(store, record, op) {
if(record.get("group") === "background") {
updateBackground(store, record);
+ } else {
+ // the visible background layer might have been moved to a new group
+ var candidate;
+ store.each(function(r) {
+ if(r.get("group") === "background") {
+ candidate = r;
+ return false;
+ }
+ });
+ if(candidate) {
+ updateBackground(store, candidate);
+ }
}
}
});
More information about the Commits
mailing list