From 3e21905fc452cb12e544bbbf3d01b2fddf2d31f7 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Wed, 27 Feb 2008 19:32:44 +0000 Subject: [PATCH] "svg flicker at end of pan". Gecko-based browsers might not reflow svg if only style properties of dom elements are changed. Fixed by setting the scrollLeft property. r=pgiraud,tschaub (closes #1390) git-svn-id: http://svn.openlayers.org/trunk/openlayers@6389 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Vector.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index ee7137808a..bb5c76ebfb 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -271,6 +271,10 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { if (!dragging) { this.renderer.root.style.visibility = "hidden"; + // force a reflow on gecko based browsers to actually hide the svg + if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) { + this.div.scrollLeft = this.div.scrollLeft; + } this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px"; this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";