From 293294a55a276c6f1512f5773c1196584580f246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 1 Mar 2013 16:05:11 -0800 Subject: [PATCH] Have #_getCachedBounds() return clones of cached items again. Fixes issue with Tadpoles example. --- src/item/Item.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/item/Item.js b/src/item/Item.js index 654d37f8..bc3f92ac 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -652,7 +652,7 @@ var Item = this.Item = Base.extend(Callback, { bounds.x, bounds.y, bounds.width, bounds.height) // Return a clone of the cahce, so modifications won't // affect it. - : bounds.clone(); + : bounds; }; }, /** @lends Item# */{ @@ -692,7 +692,7 @@ var Item = this.Item = Base.extend(Callback, { } } if (cache && this._bounds && this._bounds[cache]) - return this._bounds[cache]; + return this._bounds[cache].clone(); // If the result of concatinating the passed matrix with our internal // one is an identity transformation, set it to null for faster // processing @@ -708,7 +708,7 @@ var Item = this.Item = Base.extend(Callback, { if (cache) { if (!this._bounds) this._bounds = {}; - this._bounds[cache] = bounds; + this._bounds[cache] = bounds.clone(); } return bounds; },