From 14549a383b48f923dfbc431be4c46cfb1e06c6d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 5 May 2011 00:16:28 +0100 Subject: [PATCH] Improve Item#_getBounds(). --- src/item/Item.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/item/Item.js b/src/item/Item.js index f83914d2..12e23ece 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -439,9 +439,10 @@ var Item = this.Item = Base.extend({ _getBounds: function(includeStroke) { var children = this.children; if (children && children.length) { - var x1, x2; - var y1 = x1 = Infinity; - var y2 = x2 = -Infinity; + var x1 = Infinity, + x2 = -Infinity, + y1 = x1, + y2 = x2; for (var i = 0, l = children.length; i < l; i++) { var child = children[i], rect = includeStroke