From ed38634a80bac0dde1015a529bf78171c2509bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 3 Jan 2017 13:41:26 +0100 Subject: [PATCH] Improve comments. --- src/item/Item.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/item/Item.js b/src/item/Item.js index 9fd06374..97c6c54b 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -1074,6 +1074,7 @@ new function() { // Injection scope for various item event handlers */ getRotation: function() { var decomposed = this._decompose(); + // Return 0 if matrix wasn't decomposed, e.g. on items with #applyMatrix return decomposed ? decomposed.rotation : 0; }, @@ -1104,6 +1105,7 @@ new function() { // Injection scope for various item event handlers getScaling: function() { var decomposed = this._decompose(), s = decomposed && decomposed.scaling; + // Return [1, 1] if matrix wasn't decomposed, e.g. with #applyMatrix. return new LinkedPoint(s ? s.x : 1, s ? s.y : 1, this, 'setScaling'); },