add offset() operation to OpenLayers.Pixel
git-svn-id: http://svn.openlayers.org/trunk/openlayers@444 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -66,6 +66,17 @@ OpenLayers.Pixel.prototype = {
|
||||
return new OpenLayers.Pixel(this.x + x, this.y + y);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*
|
||||
* @return a new Pixel with this pixel's x&y augmented by the
|
||||
* x&y values of the pixel passed in.
|
||||
* @type OpenLayers.Pixel
|
||||
*/
|
||||
offset:function(px) {
|
||||
return this.add(px.x, px.y);
|
||||
},
|
||||
|
||||
/** @final @type str */
|
||||
CLASS_NAME: "OpenLayers.Pixel"
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user