move the pathCommands out of render

makes easier to override, extend the class.
This commit is contained in:
Andrea Bogazzi 2016-07-22 11:10:30 +02:00 committed by GitHub
parent f9782cf788
commit 9980c83fb9

View file

@ -141,7 +141,7 @@
* @private
* @param {CanvasRenderingContext2D} ctx context to render path on
*/
_render: function(ctx) {
_renderPathCommands: function(ctx) {
var current, // current instruction
previous = null,
subpathStartX = 0,
@ -446,6 +446,14 @@
}
previous = current;
}
},
/**
* @private
* @param {CanvasRenderingContext2D} ctx context to render path on
*/
_render: function(ctx) {
this._renderPathCommands(ctx);
this._renderFill(ctx);
this._renderStroke(ctx);
},