OpenLayers OpenLayers

Changeset 6817

Show
Ignore:
Timestamp:
04/07/08 17:13:50 (9 months ago)
Author:
sbenthall
Message:

cleaning up Popup.js

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/topp/vespucci/lib/OpenLayers/Popup.js

    r6814 r6817  
    518518        } 
    519519    }, 
    520      
    521     /** 
    522      * Method: calculateRelativePosition 
    523      *  
    524      * Calculate the position of the popup (or what the popup should be) 
    525      * given a starting pixel position and a size value. 
    526      *  
    527      * Parameters: 
    528      * px - {<OpenLayers.Pixel>} The top and left position of the popup div. 
    529      * size - {<OpenLayers.Size>} The size of the popup div(or the size that  
    530      * it should be). 
    531      *  
    532      * Returns:  
    533      * The new top and left position of the popup div. 
    534      */ 
    535     calculateRelativePosition: function(px, size) { 
    536          
    537         px = px.clone(); 
    538          
    539         if (this.relativePosition == OpenLayers.Position.TOP_RIGHT || 
    540             this.relativePosition == OpenLayers.Position.BOTTOM_RIGHT) { 
    541             px.x -= size.w; 
    542         } 
    543          
    544         if (this.relativePosition == OpenLayers.Position.BOTTOM_LEFT || 
    545             this.relativePosition == OpenLayers.Position.BOTTOM_RIGHT) { 
    546             px.y -= size.h; 
    547         } 
    548          
    549         return px;  
    550     }, 
    551      
     520 
    552521    /** 
    553522     * Method: moveTo