mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-26 13:13:49 +01:00
fix NaN problem in group peer
This commit is contained in:
parent
3476c1cc95
commit
49da037936
@ -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 + ")");
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user