From 9977fb29bd9a2cd2d6f7da76a82e037562ce25fd Mon Sep 17 00:00:00 2001 From: Ayar Cohaila Date: Mon, 20 Aug 2018 10:59:04 -0400 Subject: [PATCH] canvas arguments out of order (#904) --- src/plot/series/canvas-wrapper.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plot/series/canvas-wrapper.js b/src/plot/series/canvas-wrapper.js index 20f803094..cc96ce0c7 100644 --- a/src/plot/series/canvas-wrapper.js +++ b/src/plot/series/canvas-wrapper.js @@ -122,11 +122,11 @@ class CanvasWrapper extends Component { } ctx.scale(pixelRatio, pixelRatio); - this.drawChildren(this.props, null, ctx); + this.drawChildren(null, this.props, ctx); } - componentDidUpdate(nextProps) { - this.drawChildren(nextProps, this.props, this.canvas.getContext('2d')); + componentDidUpdate(oldProps) { + this.drawChildren(oldProps, this.props, this.canvas.getContext('2d')); } /** @@ -136,7 +136,7 @@ class CanvasWrapper extends Component { * @param {DomRef} ctx the canvas context to be drawn on. * @returns {Array} Object for rendering */ - drawChildren(newProps, oldProps, ctx) { + drawChildren(oldProps, newProps, ctx) { const { children, innerHeight,