[fusion-commits] r2025 - trunk/widgets

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Dec 21 03:04:48 EST 2009


Author: liuar
Date: 2009-12-21 03:04:46 -0500 (Mon, 21 Dec 2009)
New Revision: 2025

Modified:
   trunk/widgets/Navigator.js
Log:
Fixed Ticket http://trac.osgeo.org/fusion/ticket/353 
Failed Zoom Rectangle windows will always be shown in the display when it touches the scalebar widget.

[Analysis]
When the cursor moved to the navigator widget, there will be a mouseEnter event triggered which silenced the event mouseOut for the draged box which could remove the box. 
[Resolution]
I invoked the method removeBox() explicitly in mouseEnter function to remove the dragged box.

Modified: trunk/widgets/Navigator.js
===================================================================
--- trunk/widgets/Navigator.js	2009-12-21 07:14:10 UTC (rev 2024)
+++ trunk/widgets/Navigator.js	2009-12-21 08:04:46 UTC (rev 2025)
@@ -285,6 +285,9 @@
         for (var i=0; i<mapWidget.handlers.length; ++i) {
           var handler = mapWidget.handlers[i];
           if (handler.active) {
+            if(handler.CLASS_NAME == "OpenLayers.Handler.Box" && handler.zoomBox != undefined){
+              handler.removeBox();
+            }
             handler.deactivate();
             this.activeControls.push(handler);
           }



More information about the fusion-commits mailing list