fix NaN problem in group peer

This commit is contained in:
Ezequiel Bergamaschi 2014-06-04 00:37:20 -03:00
parent 87b792efdf
commit 6ebfc1b233

View File

@ -70,6 +70,12 @@ web2d.peer.svg.GroupPeer = new Class({
var cx = this._position.x - this._coordOrigin.x * sx;
var cy = this._position.y - this._coordOrigin.y * sy;
//FIXME: are we sure of this values?
cx = isNaN(cx) ? 0 : cx;
cy = isNaN(cy) ? 0 : cy;
sx = isNaN(sx) ? 0 : sx;
sy = isNaN(sy) ? 0 : sy;
this._native.setAttribute("transform", "translate(" + cx + "," + cy + ") scale(" + sx + "," + sy + ")");
},