mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Improve comments.
This commit is contained in:
parent
4d81a292a2
commit
ed38634a80
1 changed files with 2 additions and 0 deletions
|
@ -1074,6 +1074,7 @@ new function() { // Injection scope for various item event handlers
|
||||||
*/
|
*/
|
||||||
getRotation: function() {
|
getRotation: function() {
|
||||||
var decomposed = this._decompose();
|
var decomposed = this._decompose();
|
||||||
|
// Return 0 if matrix wasn't decomposed, e.g. on items with #applyMatrix
|
||||||
return decomposed ? decomposed.rotation : 0;
|
return decomposed ? decomposed.rotation : 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1104,6 +1105,7 @@ new function() { // Injection scope for various item event handlers
|
||||||
getScaling: function() {
|
getScaling: function() {
|
||||||
var decomposed = this._decompose(),
|
var decomposed = this._decompose(),
|
||||||
s = decomposed && decomposed.scaling;
|
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');
|
return new LinkedPoint(s ? s.x : 1, s ? s.y : 1, this, 'setScaling');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue