Skip to content

Commit

Permalink
Fix clipping when zoomed (#6973)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle authored and etimberg committed Jan 18, 2020
1 parent 2e880ed commit 6e38813
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/core.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ class Chart {
const me = this;
const ctx = me.ctx;
const clip = meta._clip;
const canvas = me.canvas;
const area = me.chartArea;
const args = {
meta: meta,
Expand All @@ -710,9 +709,9 @@ class Chart {

helpers.canvas.clipArea(ctx, {
left: clip.left === false ? 0 : area.left - clip.left,
right: clip.right === false ? canvas.width : area.right + clip.right,
right: clip.right === false ? me.width : area.right + clip.right,
top: clip.top === false ? 0 : area.top - clip.top,
bottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom
bottom: clip.bottom === false ? me.height : area.bottom + clip.bottom
});

meta.controller.draw();
Expand Down

0 comments on commit 6e38813

Please sign in to comment.