bringing down r1660 from sandbox/euzuro/layerclone

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1661 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-10-06 18:23:51 +00:00
parent 9bae3e8848
commit 8b909e9e53

View File

@@ -115,7 +115,11 @@ OpenLayers.Pixel.prototype = {
* @type OpenLayers.Pixel
*/
offset:function(px) {
return this.add(px.x, px.y);
var newPx = this.clone();
if (px) {
newPx = this.add(px.x, px.y);
}
return newPx;
},
/** @final @type str */