Line: Set points on resize (to reset Path2D cache) (#8250)

This commit is contained in:
Jukka Kurkela 2020-12-30 15:31:44 +02:00 committed by GitHub
parent 2e43f787de
commit 6ffc380c6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,14 +28,10 @@ export default class LineController extends DatasetController {
}
// Update Line
// In resize mode only point locations change, so no need to set the points or options.
line.points = points;
// In resize mode only point locations change, so no need to set the options.
if (mode !== 'resize') {
const properties = {
points,
options: me.resolveDatasetElementOptions()
};
me.updateElement(line, undefined, properties, mode);
me.updateElement(line, undefined, {options: me.resolveDatasetElementOptions()}, mode);
}
// Update Points