From 3d94ff69681ab8ac8ccc0ecca976155c2423fa3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 7 Dec 2013 05:50:08 +0100 Subject: [PATCH] Only decompose matrix if there are bounds to be reused. --- src/item/Item.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/item/Item.js b/src/item/Item.js index 64544d19..85377a7b 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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) {