[Mapbender-commits] r3116 - branches/noframes/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Oct 3 10:48:14 EDT 2008
Author: christoph
Date: 2008-10-03 10:48:14 -0400 (Fri, 03 Oct 2008)
New Revision: 3116
Modified:
branches/noframes/http/javascripts/map_obj.js
branches/noframes/http/javascripts/mod_dragMapSize.php
Log:
bug fix in convertClickToReal
Modified: branches/noframes/http/javascripts/map_obj.js
===================================================================
--- branches/noframes/http/javascripts/map_obj.js 2008-10-03 14:28:39 UTC (rev 3115)
+++ branches/noframes/http/javascripts/map_obj.js 2008-10-03 14:48:14 UTC (rev 3116)
@@ -154,7 +154,6 @@
var wmsExtent = new Extent(bbox_minx, bbox_miny, bbox_maxx, bbox_maxy);
this.calculateExtent(wmsExtent);
- console.log("ext: %s, %s", this.frameName, this.extent);
this.mapURL = [];
if(this.frameName){
@@ -377,8 +376,8 @@
else{
roundy = performUnknownCalculation(deltaY);
}
- var posX = parseFloat(minX + (aPoint.x / width) * xtentx);
- var posY = parseFloat(maxY - (aPoint.y / height) * xtenty);
+ var posX = parseFloat(minX + (aPoint.x / this.width) * xtentx);
+ var posY = parseFloat(maxY - (aPoint.y / this.height) * xtenty);
posX = Math.round(posX * roundx) / roundx;
posY = Math.round(posY * roundy) / roundy;
return new Point(posX, posY);
Modified: branches/noframes/http/javascripts/mod_dragMapSize.php
===================================================================
--- branches/noframes/http/javascripts/mod_dragMapSize.php 2008-10-03 14:28:39 UTC (rev 3115)
+++ branches/noframes/http/javascripts/mod_dragMapSize.php 2008-10-03 14:48:14 UTC (rev 3116)
@@ -90,8 +90,9 @@
mb_arrangeElement('', "dragMapSize", dif_x, dif_y);
return;
}
-
- var pos = makeClickPos2RealWorldPos(mod_dragMapSize_target, (parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x)), (parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y)));
+ var newX = (parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x));
+ var newY = (parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y));
+ var pos = makeClickPos2RealWorldPos(mod_dragMapSize_target, newX, newY);
mb_mapObj[ind].width = parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x);
mb_mapObj[ind].height = parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y);
More information about the Mapbender_commits
mailing list