Fixed eslint issue
This commit is contained in:
parent
3465bdad68
commit
439f5080de
@ -1,9 +1,9 @@
|
|||||||
class Line {
|
class Line {
|
||||||
constructor(x1, y1, x2, y2, style = "#000000") {
|
constructor(x1, y1, x2, y2, style = "#000000") {
|
||||||
this.pos = { x: x1, y: y1 };
|
this.pos = { x: x1, y: y1 };
|
||||||
this.target = { x: x2, y: y2 };
|
this.target = { x: x2, y: y2 };
|
||||||
this.style = style;
|
this.style = style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Line;
|
module.exports = Line;
|
@ -92,7 +92,7 @@ class CanvasRenderer {
|
|||||||
|
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
} else if (child.style && child.target) {
|
} else if (child.style && child.target) {
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(0,0);
|
ctx.moveTo(0,0);
|
||||||
ctx.lineTo(child.target.x, child.target.y);
|
ctx.lineTo(child.target.x, child.target.y);
|
||||||
ctx.strokeStyle = child.style;
|
ctx.strokeStyle = child.style;
|
||||||
|
Loading…
Reference in New Issue
Block a user