From 9980c83fb9187587d752d974878536883fc38626 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Fri, 22 Jul 2016 11:10:30 +0200 Subject: [PATCH] move the pathCommands out of render makes easier to override, extend the class. --- src/shapes/path.class.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shapes/path.class.js b/src/shapes/path.class.js index 5177f840131..0ae09451aca 100644 --- a/src/shapes/path.class.js +++ b/src/shapes/path.class.js @@ -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); },