| 246 | | * Method: createFrames |
|---|
| 247 | | */ |
|---|
| 248 | | createFrames: function() { |
|---|
| 249 | | |
|---|
| 250 | | this.frames = {}; |
|---|
| 251 | | |
|---|
| 252 | | for (var pos in this.positionBlocks) { |
|---|
| 253 | | |
|---|
| 254 | | var fPosition = { |
|---|
| 255 | | 'blocks': [] |
|---|
| 256 | | }; |
|---|
| 257 | | this.frames[pos] = fPosition; |
|---|
| 258 | | |
|---|
| 259 | | fPosition.div = OpenLayers.Util.createDiv(pos + "-popup", |
|---|
| 260 | | null, null, null, 'relative' |
|---|
| | 246 | * Method: createFrame |
|---|
| | 247 | * |
|---|
| | 248 | * Parameters: |
|---|
| | 249 | * pos - {String} |
|---|
| | 250 | * |
|---|
| | 251 | * Returns: |
|---|
| | 252 | * {Object} Frame entry, with blocks array |
|---|
| | 253 | */ |
|---|
| | 254 | createFrame: function(pos) { |
|---|
| | 255 | var frame = { |
|---|
| | 256 | 'blocks': [] |
|---|
| | 257 | }; |
|---|
| | 258 | |
|---|
| | 259 | frame.div = OpenLayers.Util.createDiv(pos + "-popup", |
|---|
| | 260 | null, null, null, 'relative' |
|---|
| | 261 | ); |
|---|
| | 262 | frame.div.style.height = '100%'; |
|---|
| | 263 | frame.div.style.width = '100%'; |
|---|
| | 264 | this.groupDiv.appendChild(frame.div); |
|---|
| | 265 | |
|---|
| | 266 | var position = this.positionBlocks[pos]; |
|---|
| | 267 | for (var i = 0; i < position.blocks.length; i++) { |
|---|
| | 268 | |
|---|
| | 269 | var fBlock = {}; |
|---|
| | 270 | frame.blocks.push(fBlock); |
|---|
| | 271 | |
|---|
| | 272 | var divId = this.id + '_FrameDecorationDiv_' + i; |
|---|
| | 273 | fBlock.div = OpenLayers.Util.createDiv(divId, |
|---|
| | 274 | null, null, null, "absolute", null, "hidden", null |
|---|
| 262 | | fPosition.div.style.height = '100%'; |
|---|
| 263 | | fPosition.div.style.width = '100%'; |
|---|
| 264 | | this.groupDiv.appendChild(fPosition.div); |
|---|
| 265 | | |
|---|
| 266 | | var position = this.positionBlocks[pos]; |
|---|
| 267 | | for (var i = 0; i < position.blocks.length; i++) { |
|---|
| 268 | | |
|---|
| 269 | | var fBlock = {}; |
|---|
| 270 | | fPosition.blocks.push(fBlock); |
|---|
| 271 | | |
|---|
| 272 | | var divId = this.id + '_FrameDecorationDiv_' + i; |
|---|
| 273 | | fBlock.div = OpenLayers.Util.createDiv(divId, |
|---|
| 274 | | null, null, null, "absolute", null, "hidden", null |
|---|
| 275 | | ); |
|---|
| 276 | | |
|---|
| 277 | | var imgId = this.id + '_FrameDecorationImg_' + i; |
|---|
| 278 | | fBlock.image = OpenLayers.Util.createAlphaImageDiv(imgId, |
|---|
| 279 | | null, this.imageSize, this.imageSrc, |
|---|
| 280 | | "absolute", null, null, null |
|---|
| 281 | | ); |
|---|
| 282 | | |
|---|
| 283 | | fBlock.div.appendChild(fBlock.image); |
|---|
| 284 | | fPosition.div.appendChild(fBlock.div); |
|---|
| 285 | | } |
|---|
| 286 | | } |
|---|
| | 276 | |
|---|
| | 277 | var imgId = this.id + '_FrameDecorationImg_' + i; |
|---|
| | 278 | fBlock.image = OpenLayers.Util.createAlphaImageDiv(imgId, |
|---|
| | 279 | null, this.imageSize, this.imageSrc, |
|---|
| | 280 | "absolute", null, null, null |
|---|
| | 281 | ); |
|---|
| | 282 | |
|---|
| | 283 | fBlock.div.appendChild(fBlock.image); |
|---|
| | 284 | frame.div.appendChild(fBlock.div); |
|---|
| | 285 | } |
|---|
| | 286 | |
|---|
| | 287 | return frame; |
|---|