Anchored popups now take an 'anchor' item instead of simply an 'anchorSize'. The anchor item should have both a size *and* an offset. Basically it should be an OpenLayers.Icon. If none is passed in, defaults to (0,0) size and offset. Update placement calculation to adjust for size AND offset.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@442 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-29 09:55:04 +00:00
parent b8d6aaed64
commit 5a95469ef0
2 changed files with 23 additions and 8 deletions
+5 -1
View File
@@ -22,8 +22,12 @@ OpenLayers.Popup.AnchoredBubble.prototype =
* @param {OpenLayers.LonLat} lonlat
* @param {OpenLayers.Size} size
* @param {String} contentHTML
* @param {Object} anchor Object which must expose a
* - 'size' (OpenLayers.Size) and
* - 'offset' (OpenLayers.Pixel)
* (this is generally an OpenLayers.Icon)
*/
initialize:function(id, lonlat, size, contentHTML, anchorSize) {
initialize:function(id, lonlat, size, contentHTML, anchor) {
OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments);
},