mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Only decompose matrix if there are bounds to be reused.
This commit is contained in:
parent
43e0ac5124
commit
3d94ff6968
1 changed files with 2 additions and 2 deletions
|
@ -2563,8 +2563,8 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
// Detect matrices that contain only translations and scaling
|
||||
// and transform the cached _bounds and _position without having to
|
||||
// fully recalculate each time.
|
||||
var decomp = matrix.decompose();
|
||||
if (bounds && decomp && !decomp.shearing && decomp.angle % 90 === 0) {
|
||||
var decomp = bounds && matrix.decompose();
|
||||
if (decomp && !decomp.shearing && decomp.angle % 90 === 0) {
|
||||
// Transform the old bound by looping through all the cached bounds
|
||||
// in _bounds and transform each.
|
||||
for (var key in bounds) {
|
||||
|
|
Loading…
Reference in a new issue