[Mapbender-commits] r5405 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 25 04:04:12 EST 2010
Author: christoph
Date: 2010-01-25 04:04:11 -0500 (Mon, 25 Jan 2010)
New Revision: 5405
Modified:
trunk/mapbender/http/javascripts/map_obj.js
Log:
Modified: trunk/mapbender/http/javascripts/map_obj.js
===================================================================
--- trunk/mapbender/http/javascripts/map_obj.js 2010-01-25 09:03:32 UTC (rev 5404)
+++ trunk/mapbender/http/javascripts/map_obj.js 2010-01-25 09:04:11 UTC (rev 5405)
@@ -681,7 +681,14 @@
var posY = parseFloat(maxY - (aPoint.y / this.height) * xtenty);
posX = Math.round(posX * roundX) / roundX;
posY = Math.round(posY * roundY) / roundY;
- var pt = new Point(posX.toFixed(-digitsX), posY.toFixed(-digitsY));
+ var newX = posX, newY = posY;
+ if (digitsX < 0) {
+ newX = posX.toFixed(-digitsX);
+ }
+ if (digitsY < 0) {
+ newY = posY.toFixed(-digitsY);
+ }
+ var pt = new Point(newX, newY);
return pt;
};
More information about the Mapbender_commits
mailing list