mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Bail out of Item#transform() immediately if there is nothing to do.
This commit is contained in:
parent
469aa18f1a
commit
ad34bbf7aa
1 changed files with 3 additions and 0 deletions
|
@ -2721,6 +2721,9 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
// 'children', 'fill-gradients', 'fill-patterns', 'stroke-patterns',
|
||||
// 'lines'. Default: ['objects', 'children']
|
||||
transform: function(matrix /*, applyMatrix */) {
|
||||
// Bail out immediatelly if there is nothing to do
|
||||
if (matrix.isIdentity())
|
||||
return this;
|
||||
// Calling _changed will clear _bounds and _position, but depending
|
||||
// on matrix we can calculate and set them again.
|
||||
var bounds = this._bounds,
|
||||
|
|
Loading…
Reference in a new issue