Render canvas after setting background image.

This commit is contained in:
kangax 2012-06-04 18:23:56 +02:00
parent a239bdd2a8
commit 1bfa25acf4
4 changed files with 3 additions and 3 deletions

2
dist/all.js vendored
View file

@ -7063,7 +7063,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
_this.backgroundColor = serialized.background;
if (serialized.backgroundImage) {
_this.setBackgroundImage(serialized.backgroundImage);
_this.setBackgroundImage(serialized.backgroundImage, _this.renderAll.bind(_this));
_this.backgroundImageOpacity = serialized.backgroundImageOpacity;
_this.backgroundImageStretch = serialized.backgroundImageStretch;
}

2
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

View file

@ -166,7 +166,7 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, {
_this.backgroundColor = serialized.background;
if (serialized.backgroundImage) {
_this.setBackgroundImage(serialized.backgroundImage);
_this.setBackgroundImage(serialized.backgroundImage, _this.renderAll.bind(_this));
_this.backgroundImageOpacity = serialized.backgroundImageOpacity;
_this.backgroundImageStretch = serialized.backgroundImageStretch;
}