[mapguide-commits] r4525 - trunk/MgDev/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jan 12 21:22:50 EST 2010


Author: leaf
Date: 2010-01-12 21:22:50 -0500 (Tue, 12 Jan 2010)
New Revision: 4525

Modified:
   trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
Submit on behalf of Arthur Liu.

Fixed ticket #1242 Zoom with middle button does not work well with FireFox + Ajax View.
In ajaxmappane.templ line 3685, 

wheelZoomCursor = new Point(msie ? event.clientX - mapPosX : event.screenX - mapPosX,
        		msie ? event.clientY : event.screenY);

event.clientX returns the horizontal coordinate within the application's client area at which the event occurred 
event.screenX returns the horizontal coordinate of the event within the screen as a whole.
So, other browsers besides IE should also use event.clientX - mapPosX and event.clientY to indicate the cursor's position on map.

Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2010-01-12 22:16:05 UTC (rev 4524)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2010-01-13 02:22:50 UTC (rev 4525)
@@ -3704,8 +3704,7 @@
     if(wheelZoomDelta == null)
     {
         //Determine the cursor position
-        wheelZoomCursor = new Point(msie ? event.clientX - mapPosX : event.screenX - mapPosX,
-            msie ? event.clientY : event.screenY);
+        wheelZoomCursor = new Point(event.clientX - mapPosX, event.clientY);
         if(wheelZoomCursor.X < 0)
         {
             //Do not process wheel events in the property or legend area



More information about the mapguide-commits mailing list