OpenLayers OpenLayers

Changeset 6403

Show
Ignore:
Timestamp:
02/28/08 18:08:04 (2 years ago)
Author:
euzuro
Message:

stage one of allowing overflow in popups. when user is dragging the map, we disable it, re-enable it when they drop the map. this fixes the FF part of the bug. the IE6 bug, unfortunately, may be unfixable. we'll have to see. oh, implicit in this commit is the next that i will make that takes the specification of the 'overflow' property on the popup's contentDiv from the CSS and does it via js. that's next.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/lib/OpenLayers/Popup.js

    r6402 r6403  
    264264        } 
    265265         
     266        //listen to movestart, moveend to disable overflow (FF bug) 
     267        if (OpenLayers.Util.getBrowserName() == 'firefox') { 
     268            this.map.events.register("movestart", this, function() { 
     269                var currentOverflow = this.contentDiv.style.overflow; 
     270                if (currentOverflow != "hidden") { 
     271                    this.contentDiv._oldOverflow = currentOverflow; 
     272                    this.contentDiv.style.overflow = "hidden"; 
     273                } 
     274            }); 
     275            this.map.events.register("moveend", this, function() { 
     276                console.log("popend"); 
     277                var oldOverflow = this.contentDiv._oldOverflow; 
     278                if (oldOverflow) { 
     279                    this.contentDiv.style.overflow = oldOverflow; 
     280                    this.contentDiv._oldOverflow = null; 
     281                } 
     282            }); 
     283        } 
     284 
    266285        if (!this.autoSize) { 
    267286            this.setSize();