[Commits] r786 - sandbox/opengeo/geoexplorer/lib/GeoExt/widgets

commits at geoext.org commits at geoext.org
Fri May 15 21:27:16 CEST 2009


Author: tcoulter
Date: 2009-05-15 21:27:16 +0200 (Fri, 15 May 2009)
New Revision: 786

Modified:
   sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/MapPanel.js
Log:
Re-added MapPanel fixes for the scale slider.

Modified: sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/MapPanel.js
===================================================================
--- sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/MapPanel.js	2009-05-15 19:26:27 UTC (rev 785)
+++ sandbox/opengeo/geoexplorer/lib/GeoExt/widgets/MapPanel.js	2009-05-15 19:27:16 UTC (rev 786)
@@ -152,6 +152,27 @@
         }
     },
     
+    /**
+     * Method: onBeforeAdd
+     * Private method called before a component is added to the panel.
+     */
+    onBeforeAdd: function(item) {
+        if(typeof item.addToMap === "function") {
+            item.addToMap(this);
+        }
+        GeoExt.MapPanel.superclass.onBeforeAdd.apply(this, arguments);
+    },
+    
+    /**
+     * Method: remove
+     */
+    remove: function(item, autoDestroy) {
+        if(typeof item.removeFromMap === "function") {
+            item.removeFromMap(this);
+        }
+        GeoExt.MapPanel.superclass.remove.apply(this, arguments);
+    },
+    
     /** private: method[afterRender]
      *  Private method called after the panel has been rendered.
      */



More information about the Commits mailing list