Improve _bounds handling by introducing Item#_createBounds() that always uses LinkedRectangle class.

This commit is contained in:
Jürg Lehni 2011-06-20 17:34:43 +01:00
parent 8b66c4fa83
commit 37f5a64dce
4 changed files with 22 additions and 19 deletions
src/path

View file

@ -1766,11 +1766,10 @@ var Path = this.Path = PathItem.extend({
// Pass the matrix hidden from Bootstrap, so it still inject
// getBounds as bean too.
if (!useCache || !this._bounds) {
var bounds = getBounds(this, arguments[0]);
if (!useCache)
return bounds;
this._bounds = LinkedRectangle.create(this, 'setBounds',
bounds.x, bounds.y, bounds.width, bounds.height);
var bounds = this._createBounds(getBounds(this, arguments[0]));
if (useCache)
this._bounds = bounds;
return bounds;
}
return this._bounds;
},