From 85c8b599a029607d5303695e895170fe520842e4 Mon Sep 17 00:00:00 2001 From: Tim Mickel Date: Wed, 12 Oct 2016 15:20:40 -0400 Subject: [PATCH] Update dirty transform before calculating bounds (#47) --- src/Drawable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Drawable.js b/src/Drawable.js index effa779..c91e802 100644 --- a/src/Drawable.js +++ b/src/Drawable.js @@ -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.