add new 'add' method to OpenLayers.Pixel -- eventually this will replace addX, addY, and addSize.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@48 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -114,6 +114,18 @@ OpenLayers.Pixel.prototype = {
|
|||||||
return new OpenLayers.Pixel(this.x, this.y+h);
|
return new OpenLayers.Pixel(this.x, this.y+h);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** Return a new Pixel with this pixel's x&y augmented by
|
||||||
|
* the int values passed in.
|
||||||
|
*
|
||||||
|
* @param {int} x
|
||||||
|
* @param {int} x
|
||||||
|
*
|
||||||
|
* @return {OpenLayers.Pixel}
|
||||||
|
*/
|
||||||
|
add:function(x, y) {
|
||||||
|
return new OpenLayers.Pixel(this.x + x, this.y + y);
|
||||||
|
},
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
who:function(){return "OpenLayers.Pixel";}
|
who:function(){return "OpenLayers.Pixel";}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user