Skip to content

Commit

Permalink
canvas arguments out of order (uber#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayarcohaila committed Aug 20, 2018
1 parent 50d0bdc commit 9977fb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plot/series/canvas-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

/**
Expand All @@ -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,
Expand Down

0 comments on commit 9977fb2

Please sign in to comment.