[Mapbender-commits] r2767 - branches/2.5/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 11 07:27:35 EDT 2008
Author: christoph
Date: 2008-08-11 07:27:35 -0400 (Mon, 11 Aug 2008)
New Revision: 2767
Modified:
branches/2.5/http/javascripts/core.js
branches/2.5/http/javascripts/geometry.js
branches/2.5/http/javascripts/mod_digitize_tab.php
branches/2.5/http/javascripts/mod_dragMapSize.php
Log:
fixes http://trac.osgeo.org/mapbender/ticket/263
Modified: branches/2.5/http/javascripts/core.js
===================================================================
--- branches/2.5/http/javascripts/core.js 2008-08-11 11:01:38 UTC (rev 2766)
+++ branches/2.5/http/javascripts/core.js 2008-08-11 11:27:35 UTC (rev 2767)
@@ -58,6 +58,11 @@
var eventAfterMapObjectConstruction = new MapbenderEvent(); // possibly obsolete!
/**
+ * Triggered after the map has been resized
+ */
+var eventResizeMap = new MapbenderEvent();
+
+/**
* deprecated wrapped function
* @deprecated
*/
Modified: branches/2.5/http/javascripts/geometry.js
===================================================================
--- branches/2.5/http/javascripts/geometry.js 2008-08-11 11:01:38 UTC (rev 2766)
+++ branches/2.5/http/javascripts/geometry.js 2008-08-11 11:27:35 UTC (rev 2767)
@@ -1314,6 +1314,10 @@
var mapObjInd = getMapObjIndexByName(mapframe);
var mapframeWidth = mb_mapObj[mapObjInd].width;
var mapframeHeight = mb_mapObj[mapObjInd].height;
+ eventResizeMap.register(function () {
+ mapframeWidth = mb_mapObj[mapObjInd].width;
+ mapframeHeight = mb_mapObj[mapObjInd].height;
+ });
var style = aStyle;
var canvas = new jsGraphics(aTagName, window.frames[mapframe]);
canvas.setStroke(lineWidth);
Modified: branches/2.5/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.5/http/javascripts/mod_digitize_tab.php 2008-08-11 11:01:38 UTC (rev 2766)
+++ branches/2.5/http/javascripts/mod_digitize_tab.php 2008-08-11 11:27:35 UTC (rev 2767)
@@ -797,8 +797,8 @@
var currentPoint = currentGeometry.get(k);
var currentPointMap = new Point(Math.round((currentPoint.x - minX)*cx), Math.round((maxY - currentPoint.y)*cy));
- var isTooCloseToPrevious = lastPaintedPoint && (k > 0) && Math.abs(currentPointMap.x-lastPaintedPoint.x) <= minDist && Math.abs(currentPointMap.y-lastPaintedPoint.y) <= minDist;
- if (!isTooCloseToPrevious) {
+// var isTooCloseToPrevious = lastPaintedPoint && (k > 0) && Math.abs(currentPointMap.x-lastPaintedPoint.x) <= minDist && Math.abs(currentPointMap.y-lastPaintedPoint.y) <= minDist;
+// if (!isTooCloseToPrevious) {
var currentPointIsVisible = currentPointMap.x > 0 && currentPointMap.x < width && currentPointMap.y > 0 && currentPointMap.y < height;
if (currentPointIsVisible) {
if (!isComplete && ((k == 0 && isPolygon) || (k == lenPoint-1 && isLine))) {
@@ -824,7 +824,7 @@
smPArray[smPArray.length] = evaluateDashes(points[0], points[1], i, j, k);
}
}
- }
+// }
var previousPointMap = currentPointMap;
}
}
Modified: branches/2.5/http/javascripts/mod_dragMapSize.php
===================================================================
--- branches/2.5/http/javascripts/mod_dragMapSize.php 2008-08-11 11:01:38 UTC (rev 2766)
+++ branches/2.5/http/javascripts/mod_dragMapSize.php 2008-08-11 11:27:35 UTC (rev 2767)
@@ -101,6 +101,7 @@
var mybbox = mb_mapObj[ind].extent.split(",");
mb_mapObj[ind].extent = mybbox[0] + "," + pos[1] + "," + pos[0] + "," + mybbox[3];
setMapRequest(mod_dragMapSize_target);
+ eventResizeMap.trigger();
}
function mod_dragMapSize_drag(e){
More information about the Mapbender_commits
mailing list