Skip to content

Commit

Permalink
Please fix the lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DawnTheWitch authored Sep 30, 2023
1 parent d7839fb commit dc4956d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/AtomCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dc4956d

Please sign in to comment.