From dc4956d552e731edff5a236e72539746110b769f Mon Sep 17 00:00:00 2001 From: Dawn <93628226+DawnTheWitch@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:34:04 -0400 Subject: [PATCH] Please fix the lint --- src/AtomCreation.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AtomCreation.ts b/src/AtomCreation.ts index 874608de..516165aa 100644 --- a/src/AtomCreation.ts +++ b/src/AtomCreation.ts @@ -70,11 +70,12 @@ function moveAtom(event: MouseEvent) { * When the mouse is lifted up, removes the movement listener and adds it to the tree itself. */ function atomUp() { - let atomMetrics: TextMetrics = ctx.measureText(atom); - let newRect: Rectangle = new Rectangle( + const atomMetrics: TextMetrics = ctx.measureText(atom); + const newRect: Rectangle = new Rectangle( new Point(currentPoint.x, currentPoint.y + atomMetrics.actualBoundingBoxAscent), atomMetrics.width, - atomMetrics.fontBoundingBoxDescent + atomMetrics.actualBoundingBoxAscent); + atomMetrics.fontBoundingBoxDescent + atomMetrics.actualBoundingBoxAscent + ); const newAtom: AtomNode = new AtomNode(atom, currentPoint, newRect); tree.insert(newAtom); canvas.removeEventListener("mousemove", moveAtom);