[Commits] r454 - in core/trunk/geoext: lib/GeoExt/widgets tests/lib/GeoExt/widgets

commits at geoext.org commits at geoext.org
Fri Apr 24 00:21:07 CEST 2009


Author: tschaub
Date: 2009-04-24 00:21:07 +0200 (Fri, 24 Apr 2009)
New Revision: 454

Modified:
   core/trunk/geoext/lib/GeoExt/widgets/Popup.js
   core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
Log:
Renaming the anchor and unanchor methods so they don't conflict with ext properties.  r=sbenthall (closes #44)

Modified: core/trunk/geoext/lib/GeoExt/widgets/Popup.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/widgets/Popup.js	2009-04-23 20:29:44 UTC (rev 453)
+++ core/trunk/geoext/lib/GeoExt/widgets/Popup.js	2009-04-23 22:21:07 UTC (rev 454)
@@ -153,7 +153,7 @@
         if(this.unpinnable) {
             this.addTool({
                 id: 'unpin',
-                handler: this.unanchor.createDelegate(this, [])
+                handler: this.unanchorPopup.createDelegate(this, [])
             });
         }
 
@@ -181,7 +181,7 @@
 
         /* Anchoring */
         if(this.anchored) {
-            this.anchor();
+            this.anchorPopup();
         }
 
         this.show();
@@ -252,12 +252,12 @@
     },
 
     /**
-     * Method: position
+     * Method: anchorPopup
      *     Anchors a popup to its feature
      *     by registering listeners that reposition the popup
      *     when the map is moved.
      */
-    anchor: function() {
+    anchorPopup: function() {
         this.map.events.on({
             "move" : this.position,
             scope : this            
@@ -272,12 +272,12 @@
     },
 
     /**
-     * APIMethod: unanchor
+     * APIMethod: unanchorPopup
      *     Unanchors a popup from its feature.
      *     Currently, this removes the popup from its MapPanel
      *     and adds it to the page body.
      */
-    unanchor: function() {
+    unanchorPopup: function() {
         this.unbindFromMapPanel();
 
         //make the window draggable

Modified: core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html
===================================================================
--- core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html	2009-04-23 20:29:44 UTC (rev 453)
+++ core/trunk/geoext/tests/lib/GeoExt/widgets/Popup.html	2009-04-23 22:21:07 UTC (rev 454)
@@ -83,7 +83,7 @@
             t.ok(context.mapPanel.el.child("div." + pop.popupCls),"Map panel contains popup");
         }
 
-        function test_anchor(t) {
+        function test_anchorPopup(t) {
             t.plan(4);
 
             var context = setupContext();
@@ -112,7 +112,7 @@
         }
 
 
-        function test_unanchor(t) {
+        function test_unanchorPopup(t) {
             t.plan(6);
 
             var context = setupContext();
@@ -125,7 +125,7 @@
 
             var origPos = pop.getPosition();
 
-            pop.unanchor();
+            pop.unanchorPopup();
 
             var newPos = pop.getPosition();
 



More information about the Commits mailing list