Skip to content

Commit

Permalink
fix insert at (#3146)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Aug 7, 2016
1 parent 201a8c7 commit 48a6c9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mixins/canvas_serialization.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, /** @lends fabric.Stati

fabric.util.enlivenObjects(objects, function(enlivenedObjects) {
enlivenedObjects.forEach(function(obj, index) {
_this.insertAt(obj, index, true);
// we splice the array just in case some custom classes restored from JSON
// will add more object to canvas at canvas init.
_this.insertAt(obj, index);
});

_this.renderOnAddRemove = renderOnAddRemove;
Expand Down

0 comments on commit 48a6c9c

Please sign in to comment.