From 09a6814e2dd5b8d17c669f39af5f5f704d32ba7a Mon Sep 17 00:00:00 2001 From: ahocevar Date: Sat, 9 Feb 2008 17:35:33 +0000 Subject: [PATCH] VML flicker when dragging is finished. This very nice patch by sbenthall fixes it. Thanks Seb! r=me (closes #1340) git-svn-id: http://svn.openlayers.org/trunk/openlayers@6169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Vector.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index f3334dfaa2..6bdc6177d4 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -261,14 +261,18 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { */ moveTo: function(bounds, zoomChanged, dragging) { OpenLayers.Layer.prototype.moveTo.apply(this, arguments); - + if (!dragging) { - this.div.style.left = - parseInt(this.map.layerContainerDiv.style.left) + "px"; - this.div.style.top = - parseInt(this.map.layerContainerDiv.style.top) + "px"; + this.renderer.root.style.visibility = "hidden"; + + 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); + + this.renderer.root.style.visibility = "visible"; } - + if (!this.drawn || zoomChanged) { this.drawn = true; for(var i = 0; i < this.features.length; i++) {