[OpenLayers-Commits] r2243 - sandbox/elemoine/vector/lib/OpenLayers/Layer
commits at openlayers.org
commits at openlayers.org
Mon Feb 19 12:31:30 EST 2007
Author: elemoine
Date: 2007-02-19 12:31:29 -0500 (Mon, 19 Feb 2007)
New Revision: 2243
Modified:
sandbox/elemoine/vector/lib/OpenLayers/Layer/Vector.js
Log:
Result of parseInt() must be converted to a string before being
assigned to div.style.top and div.style.left. In addition the
unit must be specified. Without this change weird bugs occur.
Modified: sandbox/elemoine/vector/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/elemoine/vector/lib/OpenLayers/Layer/Vector.js 2007-02-19 17:13:03 UTC (rev 2242)
+++ sandbox/elemoine/vector/lib/OpenLayers/Layer/Vector.js 2007-02-19 17:31:29 UTC (rev 2243)
@@ -80,8 +80,8 @@
OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
if (!dragging) {
- this.div.style.left = - parseInt(this.map.layerContainerDiv.style.left);
- this.div.style.top = - parseInt(this.map.layerContainerDiv.style.top);
+ this.div.style.left = - parseInt(this.map.layerContainerDiv.style.left) + "px";
+ this.div.style.top = - parseInt(this.map.layerContainerDiv.style.top) + "px";
var extent = this.map.getExtent();
this.renderer.setExtent(extent.left, extent.top,
extent.getWidth(), extent.getHeight());
More information about the Commits
mailing list