Remove area inclusion check when rendering points (#7910)

This commit is contained in:
Takuya Uehara 2020-10-18 22:54:39 +09:00 committed by GitHub
parent 7ce9710f33
commit de963091d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
import Element from '../core/core.element';
import {_isPointInArea, drawPoint} from '../helpers/helpers.canvas';
import {drawPoint} from '../helpers/helpers.canvas';
export default class Point extends Element {
@ -46,7 +46,7 @@ export default class Point extends Element {
return (radius + borderWidth) * 2;
}
draw(ctx, chartArea) {
draw(ctx) {
const me = this;
const options = me.options;
@ -54,13 +54,10 @@ export default class Point extends Element {
return;
}
// Clipping for Points.
if (chartArea === undefined || _isPointInArea(me, chartArea)) {
ctx.strokeStyle = options.borderColor;
ctx.lineWidth = options.borderWidth;
ctx.fillStyle = options.backgroundColor;
drawPoint(ctx, options, me.x, me.y);
}
ctx.strokeStyle = options.borderColor;
ctx.lineWidth = options.borderWidth;
ctx.fillStyle = options.backgroundColor;
drawPoint(ctx, options, me.x, me.y);
}
getRange() {