Simplify Raster#draw().

This commit is contained in:
Jürg Lehni 2011-02-22 02:27:40 +01:00
parent 689ddf7555
commit e1bcd70059

View file

@ -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();
}
});