Changeset 6686
- Timestamp:
- 03/28/08 21:47:44 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/euzuro/pop/lib/OpenLayers/Popup/Anchored.js
r6676 r6686 54 54 }, 55 55 56 /**57 * Method: calculateRelativePosition58 *59 * Parameters:60 * px - {<OpenLayers.Pixel>}61 *62 * Returns:63 * {String} The relative position ("br" "tr" "tl "bl") at which the popup64 * should be placed.65 */66 calculateRelativePosition:function(px) {67 var lonlat = this.map.getLonLatFromLayerPx(px);68 69 var extent = this.map.getExtent();70 var quadrant = extent.determineQuadrant(lonlat);71 72 return OpenLayers.Bounds.oppositeQuadrant(quadrant);73 },74 75 56 /** 76 57 * APIMethod: show … … 107 88 108 89 /** 90 * APIMethod: setSize 91 * 92 * Parameters: 93 * size - {<OpenLayers.Size>} 94 */ 95 setSize:function(size) { 96 OpenLayers.Popup.prototype.setSize.apply(this, arguments); 97 98 if ((this.lonlat) && (this.map)) { 99 var px = this.map.getLayerPxFromLonLat(this.lonlat); 100 this.moveTo(px); 101 } 102 }, 103 104 /** 105 * Method: calculateRelativePosition 106 * 107 * Parameters: 108 * px - {<OpenLayers.Pixel>} 109 * 110 * Returns: 111 * {String} The relative position ("br" "tr" "tl "bl") at which the popup 112 * should be placed. 113 */ 114 calculateRelativePosition:function(px) { 115 var lonlat = this.map.getLonLatFromLayerPx(px); 116 117 var extent = this.map.getExtent(); 118 var quadrant = extent.determineQuadrant(lonlat); 119 120 return OpenLayers.Bounds.oppositeQuadrant(quadrant); 121 }, 122 123 /** 109 124 * Method: updateRelativePosition 110 125 * The popup has been moved to a new relative location, so we may want to … … 120 135 }, 121 136 122 /**123 * Method: setSize124 *125 * Parameters:126 * size - {<OpenLayers.Size>}127 */128 setSize:function(size) {129 OpenLayers.Popup.prototype.setSize.apply(this, arguments);130 131 if ((this.lonlat) && (this.map)) {132 var px = this.map.getLayerPxFromLonLat(this.lonlat);133 this.moveTo(px);134 }135 },136 137 137 /** 138 138 * Method: calculateNewPx
