From e1bcd700590811bf219fcbf1079118244f6b02dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 22 Feb 2011 02:27:40 +0100 Subject: [PATCH] Simplify Raster#draw(). --- src/item/Raster.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/item/Raster.js b/src/item/Raster.js index d969eeb0..1c484aff 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -122,8 +122,8 @@ Raster = Item.extend({ draw: function(ctx) { ctx.save(); this.matrix.applyToContext(ctx); - var image = this._canvas ? this._canvas : this.image; - ctx.drawImage(image, -this.size.width / 2, -this.size.height / 2); + ctx.drawImage(this._canvas || this.image, + -this.size.width / 2, -this.size.height / 2); ctx.restore(); } }); \ No newline at end of file