OpenLayers OpenLayers

Changeset 1615

Show
Ignore:
Timestamp:
10/05/06 16:56:40 (2 years ago)
Author:
euzuro
Message:

make setVisibility() actually call display(). also add some comments on this rather funky situation.

Files:

Legend:

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

    r1611 r1615  
    237237    }, 
    238238 
    239     /**  
     239    /** Set the visibility flag for the layer and hide/show&redraw accordingly.  
     240     *   Fire event unless otherwise specified 
     241     *  
     242     * Note that visibility is no longer simply whether or not the layer's 
     243     *  style.display is set to "block". Now we store a 'visibility' state  
     244     *  property on the layer class, this allows us to remember whether or not 
     245     *  we *desire* for a layer to be visible. In the case where the map's  
     246     *  resolution is out of the layer's range, this desire may be subverted. 
     247     *   
    240248     * @param {Boolean} visible Whether or not to display the layer  
    241249     *                          (if in range) 
     
    245253        if (visibility != this.visibility) { 
    246254            this.visibility = visibility; 
     255            this.display(visibility); 
    247256            if (this.map != null) { 
    248257                var extent = this.map.getExtent(); 
     
    258267    }, 
    259268 
    260     /**  
     269    /** Hide or show the Layer 
     270     *  
    261271     * @param {Boolean} display 
    262272     */