[OpenLayers-Commits] r2078 - sandbox/vector/lib/OpenLayers/Layer

commits at openlayers.org commits at openlayers.org
Thu Dec 21 05:31:17 EST 2006


Author: pgiraud
Date: 2006-12-21 05:31:14 -0500 (Thu, 21 Dec 2006)
New Revision: 2078

Modified:
   sandbox/vector/lib/OpenLayers/Layer/Vector.js
Log:
isFixed parameter set to false, moveTo() code changed to move the svg container element when user stops dragging

Modified: sandbox/vector/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/vector/lib/OpenLayers/Layer/Vector.js	2006-12-17 13:12:39 UTC (rev 2077)
+++ sandbox/vector/lib/OpenLayers/Layer/Vector.js	2006-12-21 10:31:14 UTC (rev 2078)
@@ -15,7 +15,7 @@
     isBaseLayer: false,
 
     /** @type Boolean */
-    isFixed: true,
+    isFixed: false,
 	
     /** @type Boolean */
 	isVector: true,
@@ -139,12 +139,17 @@
         
     },
 
-    moveTo:function(bounds, zoomChanged, minor) {
+    moveTo:function(bounds, zoomChanged, dragging) {
         OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
         this.renderer.createRoot(this.div);
         this.renderer.setSize(this.map.getSize().w, this.map.getSize().h);
-        this.renderer.setExtent(this.map.getExtent().left, this.map.getExtent().top, 
-                                this.map.getExtent().getWidth(), this.map.getExtent().getHeight());
+        
+        if (!dragging) {
+            this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left);
+            this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top);
+            this.renderer.setExtent(this.map.getExtent().left, this.map.getExtent().top, 
+                                    this.map.getExtent().getWidth(), this.map.getExtent().getHeight());
+        }
     },
     
     



More information about the Commits mailing list