mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 05:10:26 +08:00
better let const var variable
This commit is contained in:
parent
9f5a7f0e2d
commit
53a4b494ee
@ -102,26 +102,24 @@ export class Line<
|
|||||||
}
|
}
|
||||||
|
|
||||||
_sceneFunc(context: Context) {
|
_sceneFunc(context: Context) {
|
||||||
let points = this.points(),
|
const points = this.points(),
|
||||||
length = points.length,
|
length = points.length,
|
||||||
tension = this.tension(),
|
tension = this.tension(),
|
||||||
closed = this.closed(),
|
closed = this.closed(),
|
||||||
bezier = this.bezier(),
|
bezier = this.bezier();
|
||||||
tp,
|
|
||||||
len,
|
|
||||||
n;
|
|
||||||
|
|
||||||
if (!length) {
|
if (!length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let n = 0;
|
||||||
|
|
||||||
context.beginPath();
|
context.beginPath();
|
||||||
context.moveTo(points[0], points[1]);
|
context.moveTo(points[0], points[1]);
|
||||||
|
|
||||||
// tension
|
// tension
|
||||||
if (tension !== 0 && length > 4) {
|
if (tension !== 0 && length > 4) {
|
||||||
tp = this.getTensionPoints();
|
const tp = this.getTensionPoints();
|
||||||
len = tp.length;
|
const len = tp.length;
|
||||||
n = closed ? 0 : 4;
|
n = closed ? 0 : 4;
|
||||||
|
|
||||||
if (!closed) {
|
if (!closed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user