Update dirty transform before calculating bounds (#47)

This commit is contained in:
Tim Mickel 2016-10-12 15:20:40 -04:00 committed by GitHub
parent 8e7a85d1a6
commit 85c8b599a0

View File

@ -445,6 +445,9 @@ Drawable.prototype.getBounds = function () {
if (this.needsConvexHullPoints()) {
throw 'Needs updated convex hull points before bounds calculation.';
}
if (this._transformDirty) {
this._calculateTransform();
}
// First, transform all the convex hull points by the current Drawable's
// transform. This allows us to skip recalculating the convex hull
// for many Drawable updates, including translation, rotation, scaling.