Skip to content

Commit

Permalink
Reloadbackgrounds different from images (#3550)
Browse files Browse the repository at this point in the history
* fix enliving
  • Loading branch information
asturur authored Dec 19, 2016
1 parent ff21b07 commit 1034a7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mixins/canvas_serialization.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati
}

if (property === 'backgroundImage' || property === 'overlayImage') {
fabric.Image.fromObject(value, function(img) {
_this[property] = img;
fabric.util.enlivenObjects([value], function(enlivedObject){
_this[property] = enlivedObject[0];
loaded[property] = true;
callback && callback();
});
})
}
else {
this['set' + fabric.util.string.capitalize(property, true)](value, function() {
Expand Down

0 comments on commit 1034a7c

Please sign in to comment.