From 46100b24bd1b6e3ba422777089d5b7a3e870d3b2 Mon Sep 17 00:00:00 2001 From: Anders Lisspers Date: Thu, 3 Apr 2014 16:20:05 +0200 Subject: [PATCH] Moves the resetting of _currentTransform.target inside `if (activeGroup)` This solves a problem that occurred if you were transforming (moving, scaling, rotating) a single object when toJSON()/toObject() was run. --- src/static_canvas.class.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/static_canvas.class.js b/src/static_canvas.class.js index b89d07eb..1fd7a6e0 100644 --- a/src/static_canvas.class.js +++ b/src/static_canvas.class.js @@ -895,11 +895,12 @@ activeGroup.forEachObject(function(o) { o.set('active', true); }); + + if (this._currentTransform) { + this._currentTransform.target = this.getActiveGroup(); + } } - if (this._currentTransform) { - this._currentTransform.target = this.getActiveGroup(); - } return data; },