[mapguide-commits] r5512 - sandbox/adsk/2.3r/Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Jan 28 02:15:25 EST 2011
Author: liuar
Date: 2011-01-27 23:15:25 -0800 (Thu, 27 Jan 2011)
New Revision: 5512
Modified:
sandbox/adsk/2.3r/Web/src/viewerfiles/ajaxmappane.templ
Log:
Integrate r5501 from trunk.
It's to fix http://trac.osgeo.org/mapguide/ticket/1585
Modified: sandbox/adsk/2.3r/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- sandbox/adsk/2.3r/Web/src/viewerfiles/ajaxmappane.templ 2011-01-28 06:57:57 UTC (rev 5511)
+++ sandbox/adsk/2.3r/Web/src/viewerfiles/ajaxmappane.templ 2011-01-28 07:15:25 UTC (rev 5512)
@@ -2817,12 +2817,12 @@
pt1 = ScreenToMapUnits(x1, y1);
pt2 = ScreenToMapUnits(x2, y2);
- mcsW = pt2.X - pt1.X;
- mcsH = pt2.Y - pt1.Y;
+ mcsW = Math.abs(pt2.X - pt1.X);
+ mcsH = Math.abs(pt2.Y - pt1.Y);
scale = CalculateScale1(mcsW, mcsH, mapDevW, mapDevH);
scale = finscale? GetNearestFiniteScale(scale): NormalizeScale(scale);
HideMapImage();
- GotoView(pt1.X + mcsW/2, pt1.Y + mcsH/2, scale, true, false);
+ GotoView(pt1.X + (pt2.X - pt1.X)/2, pt1.Y + (pt2.Y - pt1.Y)/2, scale, true, false);
}
else if(tool == 0)
{
More information about the mapguide-commits
mailing list