better let const var variable

This commit is contained in:
tbo47 2025-03-27 10:16:05 +00:00
parent 9f5a7f0e2d
commit 53a4b494ee

View File

@ -102,26 +102,24 @@ export class Line<
}
_sceneFunc(context: Context) {
let points = this.points(),
const points = this.points(),
length = points.length,
tension = this.tension(),
closed = this.closed(),
bezier = this.bezier(),
tp,
len,
n;
bezier = this.bezier();
if (!length) {
return;
}
let n = 0;
context.beginPath();
context.moveTo(points[0], points[1]);
// tension
if (tension !== 0 && length > 4) {
tp = this.getTensionPoints();
len = tp.length;
const tp = this.getTensionPoints();
const len = tp.length;
n = closed ? 0 : 4;
if (!closed) {