Improve comments.

This commit is contained in:
Jürg Lehni 2017-01-03 13:41:26 +01:00
parent 4d81a292a2
commit ed38634a80

View file

@ -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');
},