Improve Item#_getBounds().

This commit is contained in:
Jürg Lehni 2011-05-05 00:16:28 +01:00
parent 7334e824f5
commit 14549a383b

View file

@ -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