the add() and offset() functions return new copies of the OpenLayers.Pixel Objects and do not affect the original. Personally, I think this is a horrible way of doing things, but this is how it has been. Maybe something to change for in the future.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@461 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -107,11 +107,7 @@ OpenLayers.Popup.Anchored.prototype =
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
calculateNewPx:function(px) {
|
||||
var newPx = px.copyOf();
|
||||
|
||||
//adjust for offset
|
||||
newPx.offset(this.anchor.offset);
|
||||
|
||||
var newPx = px.offset(this.anchor.offset);
|
||||
|
||||
var top = (this.relativePosition.charAt(0) == 't');
|
||||
newPx.y += (top) ? -this.size.h : this.anchor.size.h;
|
||||
|
||||
Reference in New Issue
Block a user