From f79e561512e896efc57b8761706dc8db2cc482e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 9 Apr 2013 19:24:41 -0700 Subject: [PATCH] Handle bounds correctly for groups with only empty children. --- src/item/Item.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/item/Item.js b/src/item/Item.js index f4f80205..813a1e3e 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -874,7 +874,9 @@ var Item = this.Item = Base.extend(Callback, { y2 = Math.max(rect.y + rect.height, y2); } } - return Rectangle.create(x1, y1, x2 - x1, y2 - y1); + return isFinite(x1) + ? Rectangle.create(x1, y1, x2 - x1, y2 - y1) + : new Rectangle(); }, setBounds: function(rect) {