OpenLayers OpenLayers

Changeset 6098

Show
Ignore:
Timestamp:
02/08/08 08:20:23 (1 year ago)
Author:
euzuro
Message:

hello cd listeners. why, you might ask, don't we just take this Framed class you're so excited about and make it a bit more general? wouldn't it be nice if other people could have a [somewhat] easy way of building their own image/frame-based popups? it would. in fairness to those listeners, here's side two.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/examples/framedPopups.html

    r6095 r6098  
    3535            addMarker(); 
    3636             
    37             initialDecoration = OpenLayers.Popup.Framed.prototype.bubble; 
     37            initialDecoration = OpenLayers.Popup.FramedCloud.prototype.bubble; 
    3838        } 
    3939         
     
    6161                     "OpenLayers rocks !", 
    6262                      
    63                 popup = new OpenLayers.Popup.Framed("chicken",  
     63                popup = new OpenLayers.Popup.FramedCloud("chicken",  
    6464                     feature.lonlat, 
    6565                     new OpenLayers.Size(200, 200), 
     
    9595             
    9696            if (backToInitDecoration) { 
    97                 OpenLayers.Popup.Framed.prototype.bubble = initialDecoration; 
     97                OpenLayers.Popup.FramedCloud.prototype.bubble = initialDecoration; 
    9898                backToInitDecoration = false; 
    9999            } else { 
    100                 OpenLayers.Popup.Framed.prototype.bubble = { 
     100                OpenLayers.Popup.FramedCloud.prototype.bubble = { 
    101101                    image: { 
    102102                        src: OpenLayers.Util.getImagesLocation() + 'popup_orange.png', 
  • sandbox/euzuro/pop/lib/OpenLayers.js

    r6095 r6098  
    119119            "OpenLayers/Popup/AnchoredBubble.js", 
    120120            "OpenLayers/Popup/Framed.js", 
     121            "OpenLayers/Popup/FramedCloud.js", 
    121122            "OpenLayers/Feature.js", 
    122123            "OpenLayers/Feature/Vector.js", 
  • sandbox/euzuro/pop/lib/OpenLayers/Popup/Framed.js

    r6095 r6098  
    1010       
    1111    /** 
    12      * APIProperty: minSize 
    13      * {<OpenLayers.Size>} popup minimum size 
    14      */ 
    15     minSize: new OpenLayers.Size(105, 10), 
    16  
    17     /** 
    18      * APIProperty: padding 
    19      * {<OpenLayers.Bounds>} Inside padding of the popup. 
    20      */ 
    21     padding: new OpenLayers.Bounds(15, 61, 32, 15),     
    22      
    23     /** 
    24      * The x and y offset needed position the stem image over the marker. 
    25      */ 
    26     offset: new OpenLayers.Pixel(55, -10), 
    27  
    28     /** 
    2912     * APIProperty: imageSrc 
    3013     * {String} 
    3114     */ 
    32     imageSrc: OpenLayers.Util.getImagesLocation() + 'popup.png'
     15    imageSrc: null
    3316     
    3417    /** 
     
    3619     * {<OpenLayers.Size>} 
    3720     */ 
    38     imageSize: new OpenLayers.Size(676, 736), 
    39  
    40     /** 
    41      * size - {Array} width and height of the clipping div (accepts 'auto'  
    42      *     values) 
    43      * anchor - {Array} top, right, bottom, left values to position  
    44      *     the clipping div 
    45      * position - {<OpenLayers.Pixel>} left and top position of the image,  
    46      *     in order to show a specific part of the global popup image 
    47      */ 
    48     blocks: [ 
    49         { // top-left 
    50             size: ['auto', 'auto'], 
    51             anchor: [0, 38, 68, 0], 
    52             position: new OpenLayers.Pixel(0, 0) 
    53         }, 
    54         { //top-right 
    55             size: [38, 'auto'], 
    56             anchor: [0, 0, 68, null], 
    57             position: new OpenLayers.Pixel(-638, 0) 
    58         }, 
    59         { //bottom-left 
    60             size: ['auto', 39], 
    61             anchor: [null, 97, 29, 0], 
    62             position: new OpenLayers.Pixel(0, -629) 
    63         }, 
    64         { // stem 
    65             size: [97, 68], 
    66             anchor: [null, 0, 0, null], 
    67             position: new OpenLayers.Pixel(0, -668) 
    68         } 
    69     ], 
    70      
     21    imageSize: null, 
     22 
     23    /** 
     24     * APIProperty: offset 
     25     * {<OpenLayers.Pixel>} The x and y offset needed position the stem image  
     26     *     over the marker. 
     27     */ 
     28    offset: null, 
     29 
    7130    /**  
    7231     * APIProperty: fixedRelativePosition