Skip to content

Commit

Permalink
Fix: update line options on resize, for gradients (#8832)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Apr 6, 2021
1 parent b4d118e commit 757ddf2
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/controllers/controller.line.js
Expand Up @@ -29,17 +29,14 @@ export default class LineController extends DatasetController {
line._decimated = !!_dataset._decimated;
line.points = points;

// In resize mode only point locations change, so no need to set the options.
if (mode !== 'resize') {
const options = me.resolveDatasetElementOptions(mode);
if (!me.options.showLine) {
options.borderWidth = 0;
}
me.updateElement(line, undefined, {
animated: !animationsDisabled,
options
}, mode);
const options = me.resolveDatasetElementOptions(mode);
if (!me.options.showLine) {
options.borderWidth = 0;
}
me.updateElement(line, undefined, {
animated: !animationsDisabled,
options
}, mode);

// Update Points
me.updateElements(points, start, count, mode);
Expand Down

0 comments on commit 757ddf2

Please sign in to comment.