Changeset 1704
- Timestamp:
- 10/18/06 12:50:07 (2 years ago)
- Files:
-
- trunk/openlayers/examples/popups.html (modified) (1 diff)
- trunk/openlayers/img/close.gif (added)
- trunk/openlayers/lib/OpenLayers/Popup.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Popup/Anchored.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/examples/popups.html
r1592 r1704 38 38 new OpenLayers.LonLat(5,40), 39 39 new OpenLayers.Size(200,200), 40 "example popup"); 40 "example popup", 41 true); 41 42 42 43 map.addPopup(popup); trunk/openlayers/lib/OpenLayers/Popup.js
r1695 r1704 61 61 * @param {OpenLayers.Size} size 62 62 * @param {String} contentHTML 63 */ 64 initialize:function(id, lonlat, size, contentHTML) { 63 * @param {Boolean} closeBox 64 */ 65 initialize:function(id, lonlat, size, contentHTML, closeBox) { 65 66 if (id == null) { 66 67 id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); … … 90 91 this.contentDiv.className = 'olPopupContent'; 91 92 this.div.appendChild(this.contentDiv); 93 94 if (closeBox == true) { 95 // close icon 96 var closeSize = new OpenLayers.Size(17,17); 97 var img = OpenLayers.Util.getImagesLocation() + "close.gif"; 98 var closeImg = OpenLayers.Util.createAlphaImageDiv(this.id + "_close", 99 null, 100 closeSize, 101 img); 102 closeImg.style.right = this.padding + "px"; 103 closeImg.style.top = this.padding + "px"; 104 this.div.appendChild(closeImg); 105 106 var closeEvents = new OpenLayers.Events(this, closeImg); 107 closeEvents.register("mousedown", this, this.hide); 108 109 } 92 110 93 111 this.registerEvents(); trunk/openlayers/lib/OpenLayers/Popup/Anchored.js
r1651 r1704 32 32 * - 'offset' (OpenLayers.Pixel) 33 33 * (this is generally an OpenLayers.Icon) 34 * @param {Boolean} closeBox 34 35 */ 35 initialize:function(id, lonlat, size, contentHTML, anchor ) {36 var newArguments = new Array(id, lonlat, size, contentHTML );36 initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) { 37 var newArguments = new Array(id, lonlat, size, contentHTML, closeBox); 37 38 OpenLayers.Popup.prototype.initialize.apply(this, newArguments); 38 39 trunk/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js
r1695 r1704 29 29 * - 'offset' (OpenLayers.Pixel) 30 30 * (this is generally an OpenLayers.Icon) 31 * @param {Boolean} closeBox 31 32 */ 32 initialize:function(id, lonlat, size, contentHTML, anchor ) {33 initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) { 33 34 OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments); 34 35 },
