Skip to content

Commit

Permalink
done something (#4850)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Mar 24, 2018
1 parent 682eac4 commit 375d993
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/canvas.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,22 @@
this.clearContext(this.contextTop);
this.contextTopDirty = false;
}
if (this.isDrawingMode && this._isCurrentlyDrawing) {
this.freeDrawingBrush && this.freeDrawingBrush._render();
}
this.renderTopLayer(this.contextTop);
var canvasToDrawOn = this.contextContainer;
this.renderCanvas(canvasToDrawOn, this._chooseObjectsToRender());
return this;
},

renderTopLayer: function(ctx) {
if (this.isDrawingMode && this._isCurrentlyDrawing) {
this.freeDrawingBrush && this.freeDrawingBrush._render();
}
// we render the top context - last object
if (this.selection && this._groupSelector) {
this._drawSelection(ctx);
}
},

/**
* Method to render only the top canvas.
* Also used to render the group selection box.
Expand All @@ -394,12 +402,7 @@
renderTop: function () {
var ctx = this.contextTop;
this.clearContext(ctx);

// we render the top context - last object
if (this.selection && this._groupSelector) {
this._drawSelection(ctx);
}

this.renderTopLayer(ctx);
this.fire('after:render');
this.contextTopDirty = true;
return this;
Expand Down

0 comments on commit 375d993

Please sign in to comment.