diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index 63bc613a41..1c6023a6f0 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -11,19 +11,19 @@ * Inherits from: * - */ -OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { +OpenLayers.Popup.Anchored = + OpenLayers.Class(OpenLayers.Popup, { /** * Parameter: relativePosition - * {String} Relative position of the popup ("lr", "ll", "tr", or "tl") + * {String} Relative position of the popup ("lr", "ll", "tr", or "tl"). */ relativePosition: null, /** * Parameter: anchor - * {Object} Object to which we'll anchor the popup. - * Must expose a 'size' () and - * 'offset' () + * {Object} Object to which we'll anchor the popup. Must expose a + * 'size' () and 'offset' (). */ anchor: null, @@ -35,10 +35,8 @@ OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { * lonlat - {} * size - {} * contentHTML - {String} - * anchor - {Object} Object which must expose a - * - 'size' (OpenLayers.Size) and - * - 'offset' (OpenLayers.Pixel) - * (this is generally an OpenLayers.Icon) + * anchor - {Object} Object which must expose a 'size' + * and 'offset' (generally an ). * closeBox - {Boolean} */ initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) { @@ -57,7 +55,7 @@ OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { * px - {} * * Returns: - * {DOMElement} Reference to a div that contains the drawn popup + * {DOMElement} Reference to a div that contains the drawn popup. */ draw: function(px) { if (px == null) { @@ -80,7 +78,7 @@ OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { * * Returns: * {String} The relative position ("br" "tr" "tl "bl") at which the popup - * should be placed + * should be placed. */ calculateRelativePosition:function(px) { var lonlat = this.map.getLonLatFromLayerPx(px); @@ -96,9 +94,8 @@ OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { * * Parameters: * px - {} - */ + */ moveTo: function(px) { - var newPx = this.calculateNewPx(px); var newArguments = new Array(newPx); @@ -110,7 +107,7 @@ OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { * * Parameters: * size - {} - */ + */ setSize:function(size) { OpenLayers.Popup.prototype.setSize.apply(this, arguments); @@ -128,7 +125,7 @@ OpenLayers.Popup.Anchored = OpenLayers.Class(OpenLayers.Popup, { * * Returns: * {} The the new px position of the popup on the screen - * relative to the passed-in px + * relative to the passed-in px. */ calculateNewPx:function(px) { var newPx = px.offset(this.anchor.offset);