OpenLayers OpenLayers

Changeset 2135

Show
Ignore:
Timestamp:
01/10/07 16:56:07 (2 years ago)
Author:
tschaub
Message:

allow controls to live outside the map viewport - with changes to the overview map to handle this (#465)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js

    r2089 r2135  
    148148        // Optionally add min/max buttons if the control will go in the 
    149149        // map viewport. 
    150         if(!this.div.parentNode  || 
    151            (this.div.parentNode.className == 'olMapViewport')) { 
     150        if(!this.outsideViewport) { 
    152151            this.div.className = 'olControlOverviewMapContainer'; 
    153152            var imgLocation = OpenLayers.Util.getImagesLocation(); 
  • trunk/openlayers/lib/OpenLayers/Map.js

    r2117 r2135  
    481481     */     
    482482    addControlToMap: function (control, px) { 
     483        // If a control doesn't have a div at this point, it belongs in the 
     484        // viewport. 
     485        control.outsideViewport = (control.div != null); 
    483486        control.setMap(this); 
    484487        var div = control.draw(px); 
    485488        if (div) { 
    486             // Only elements without parents should be appended to the viewport. 
    487             // In IE, even elements without parents are given a parent node 
    488             // of type 11 (DOCUMENT_FRAGMENT_NODE). 
    489             if(!div.parentNode || (div.parentNode.nodeType == 11)) { 
     489            if(!control.outsideViewport) { 
    490490                div.style.zIndex = this.Z_INDEX_BASE['Control'] + 
    491491                                    this.controls.length;