Changeset 6680
- Timestamp:
- 03/28/08 21:38:16 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/euzuro/pop/lib/OpenLayers/Popup/Framed.js
r6679 r6680 10 10 * Class: OpenLayers.Popup.Framed 11 11 * 12 * Inherits from: 12 * Inherits from: 13 13 * - <OpenLayers.Popup.Anchored> 14 14 */ 15 OpenLayers.Popup.Framed = 15 OpenLayers.Popup.Framed = 16 16 OpenLayers.Class(OpenLayers.Popup.Anchored, { 17 17 18 18 /** 19 19 * Property: imageSrc … … 21 21 */ 22 22 imageSrc: null, 23 23 24 24 /** 25 25 * Property: imageSize … … 38 38 */ 39 39 isAlphaImage: false, 40 40 41 41 /** 42 42 * Property: positionBlocks … … 53 53 */ 54 54 positionBlocks: null, 55 55 56 56 /** 57 57 * Property: blocks … … 79 79 */ 80 80 fixedRelativePosition: false, 81 81 82 82 /** 83 83 * Constructor: OpenLayers.Popup.Framed … … 106 106 107 107 this.contentDiv.style.position = "absolute"; 108 108 109 109 this.contentDiv.style.zIndex = 1; 110 110 if (closeBox) { 111 111 this.closeDiv.style.zIndex = 1; 112 112 } 113 113 114 114 this.groupDiv.style.position = "absolute"; 115 115 this.groupDiv.style.top = "0px"; … … 126 126 this.imageSize = null; 127 127 this.fixedRelativePosition = false; 128 128 129 129 this.positionBlocks = null; 130 130 131 131 //remove our blocks 132 132 for(var i = 0; i < this.blocks.length; i++) { 133 133 var block = this.blocks[j]; 134 134 135 135 if (block.image) { 136 136 this.groupDiv.removeChild(block.image); 137 137 } 138 138 block.image = null; 139 139 140 140 if (block.div) { 141 141 this.groupDiv.removeChild(block.div); 142 142 } 143 block.div = null; 143 block.div = null; 144 144 } 145 145 this.blocks = null; 146 146 147 OpenLayers.Popup.Anchored.prototype.destroy.apply(this, arguments); 147 OpenLayers.Popup.Anchored.prototype.destroy.apply(this, arguments); 148 148 }, 149 149 … … 158 158 setSize:function(size) { 159 159 OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); 160 160 161 161 this.updateBlocks(); 162 162 }, 163 163 164 164 /** 165 165 * Method: calculateRelativePosition … … 186 186 return relativePosition; 187 187 }, 188 188 189 189 /** 190 190 * Method: updateRelativePosition … … 194 194 //update the padding 195 195 this.padding = this.positionBlocks[this.relativePosition].padding; 196 196 197 197 //update the position of our close box to new padding 198 198 if (this.closeDiv) { … … 205 205 this.closeDiv.style.top = contentDivPadding.top + 206 206 this.padding.top + "px"; 207 } 207 } 208 208 209 209 this.updateBlocks(); … … 224 224 this, arguments 225 225 ); 226 226 227 227 newPx = newPx.offset(this.positionBlocks[this.relativePosition].offset); 228 228 229 return newPx; 229 return newPx; 230 230 }, 231 231 … … 251 251 (this.isAlphaImage) ? OpenLayers.Util.createAlphaImageDiv 252 252 : OpenLayers.Util.createImage; 253 253 254 254 block.image = imageCreator(imgId, 255 255 null, this.imageSize, this.imageSrc, … … 261 261 } 262 262 }, 263 263 264 264 /** 265 265 * Method: updateBlocks … … 296 296 var h = (isNaN(positionBlock.size.h)) ? this.size.h - (b + t) 297 297 : positionBlock.size.h; 298 298 299 299 block.div.style.width = w + 'px'; 300 300 block.div.style.height = h + 'px'; … … 304 304 block.div.style.right = (r != null) ? r + 'px' : ''; 305 305 block.div.style.top = (t != null) ? t + 'px' : ''; 306 306 307 307 block.image.style.left = positionBlock.position.x + 'px'; 308 308 block.image.style.top = positionBlock.position.y + 'px'; … … 320 320 // an image -- changing the background color makes no sense. 321 321 }, 322 322 323 323 /** 324 324 * APIMethod: setBorder … … 340 340 // to a framed popup 341 341 }, 342 342 343 343 CLASS_NAME: "OpenLayers.Popup.Framed" 344 344 }); sandbox/euzuro/pop/lib/OpenLayers/Popup/FramedCloud.js
r6672 r6680 22 22 */ 23 23 autoSize: true, 24 24 25 25 /** 26 26 * APIProperty: panMapIfOutOfView … … 28 28 */ 29 29 panMapIfOutOfView: true, 30 30 31 31 /** 32 32 * Property: imageSrc … … 34 34 */ 35 35 imageSrc: OpenLayers.Util.getImagesLocation() + 'cloud-popup-relative.png', 36 36 37 37 /** 38 38 * APIProperty: imageSize … … 40 40 */ 41 41 imageSize: new OpenLayers.Size(676, 736), 42 42 43 43 /** 44 44 * APIProperty: fixedRelativePosition … … 46 46 */ 47 47 fixedRelativePosition: false, 48 48 49 49 /** 50 50 * APIProperty: isAlphaImage … … 53 53 */ 54 54 isAlphaImage: false, 55 55 56 56 /** 57 57 * Property: positionBlocks … … 191 191 */ 192 192 minSize: new OpenLayers.Size(105, 10), 193 193 194 194 /** 195 195 * APIProperty: maxSize … … 197 197 */ 198 198 maxSize: new OpenLayers.Size(600, 660), 199 199 200 200 /** 201 201 * Constructor: OpenLayers.Popup.FramedCloud
