From 1e76f0554932ec36cc773034a347b95503276498 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 5 Mar 2017 13:25:55 +0100 Subject: [PATCH] Resize the cache canvas to the calculated size, rather than the specified size --- src/create-object.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/create-object.js b/src/create-object.js index 5369c69..4566610 100644 --- a/src/create-object.js +++ b/src/create-object.js @@ -52,8 +52,8 @@ module.exports = function createObject(options) { this.renderWidth = newSize.width * this.scaleX; this.renderHeight = newSize.height * this.scaleY; - this.cacheCanvas.width = this.width; - this.cacheCanvas.height = this.height; + this.cacheCanvas.width = this.renderWidth; + this.cacheCanvas.height = this.renderHeight; // TODO: bounding box?