[fusion-commits] r2378 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Thu May 5 15:24:04 EDT 2011


Author: madair
Date: 2011-05-05 12:24:04 -0700 (Thu, 05 May 2011)
New Revision: 2378

Modified:
   trunk/widgets/SelectRadius.js
Log:
re #446: combine up/done event handlers so only one is called on a single click

Modified: trunk/widgets/SelectRadius.js
===================================================================
--- trunk/widgets/SelectRadius.js	2011-05-05 15:34:56 UTC (rev 2377)
+++ trunk/widgets/SelectRadius.js	2011-05-05 19:24:04 UTC (rev 2378)
@@ -87,8 +87,7 @@
             interval: 100,
             done: this.execute,
             down: this.mouseDown,
-            move: this.mouseMove,
-            up: this.mouseUp
+            move: this.mouseMove
             }, this.handlerOptions);
         mapWidget.handlers.push(this.handler);
     },
@@ -195,17 +194,6 @@
       }
     },
     
-    mouseUp: function(geom) {
-        if (this.radiusTip && this.radiusTipType == 'dynamic') {
-            this.radiusTip.style.display = 'none';
-            this.radiusTip.innerHTML = '';
-        }
-        if (this.handler.start == this.handler.last) {
-          this.handler.clear();
-          this.execute(geom);
-        }
-    },
-
     /**
      *  set the extants of the map based on the pixel coordinates
      * passed
@@ -214,6 +202,14 @@
      * @param radius
      **/
     execute: function(geom) {
+        if (this.radiusTip && this.radiusTipType == 'dynamic') {
+            this.radiusTip.style.display = 'none';
+            this.radiusTip.innerHTML = '';
+        }
+        if (this.handler.start == this.handler.last) {
+          this.handler.clear();
+        }
+
         var options = {};
         options.geometry = geom.toString();
         options.selectionType = this.selectionType;



More information about the fusion-commits mailing list