OpenLayers OpenLayers

Changeset 7578

Show
Ignore:
Timestamp:
07/28/08 17:10:57 (4 months ago)
Author:
crschmidt
Message:

Confirmed with Tim Coulter that forcing the reflow here leads to a cleaner
refresh on FF2-based browsers. FF3 seems unaffected either way, as does Safari.

(Closes #1390)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Layer/Vector.js

    r7277 r7578  
    291291        if (!dragging) { 
    292292            this.renderer.root.style.visibility = "hidden"; 
    293             // force a reflow on gecko based browsers to actually hide the svg 
    294             if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) { 
    295                 this.div.scrollLeft = this.div.scrollLeft; 
    296             } 
    297293             
    298294            this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px"; 
     
    302298             
    303299            this.renderer.root.style.visibility = "visible"; 
     300             
     301            // Force a reflow on gecko based browsers to prevent jump/flicker. 
     302            // This seems to happen on only certain configurations; it was originally 
     303            // noticed in FF 2.0 and Linux. 
     304            if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) { 
     305                this.div.scrollLeft = this.div.scrollLeft; 
     306            } 
    304307        } 
    305308