From a2b3bd5d4627e23a9b16e34715583390b60b391e Mon Sep 17 00:00:00 2001 From: Ryan Reilly Date: Thu, 9 May 2024 19:42:44 -0400 Subject: [PATCH 1/2] Solved. Initial --- src/SharedToolUtils/DrawUtils.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SharedToolUtils/DrawUtils.ts b/src/SharedToolUtils/DrawUtils.ts index dc100a2a..3ed4cc14 100644 --- a/src/SharedToolUtils/DrawUtils.ts +++ b/src/SharedToolUtils/DrawUtils.ts @@ -96,11 +96,12 @@ export function drawAtom(thisAtom: AtomNode, color: string, currentAtom: Boolean * @param color Incoming color string. */ export function drawGuidelines(original: Point, current: Point, color: string): void { + console.log("Drawing guidelines"); ctx.beginPath(); ctx.strokeStyle = color; - const dx: number = original.x - current.x + offset.x; - const dy: number = original.y - current.y + offset.y; - ctx.rect(original.x, original.y, -dx, -dy); + const dx: number = original.x - current.x; + const dy: number = original.y - current.y; + ctx.rect(original.x + offset.x, original.y + offset.y, -dx, -dy); ctx.stroke(); } From 337ddd258030b3408299aaf4e05abe9774890359 Mon Sep 17 00:00:00 2001 From: Ryan Reilly Date: Thu, 9 May 2024 19:44:24 -0400 Subject: [PATCH 2/2] Removed console.log statement --- src/SharedToolUtils/DrawUtils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SharedToolUtils/DrawUtils.ts b/src/SharedToolUtils/DrawUtils.ts index 3ed4cc14..9fc8a152 100644 --- a/src/SharedToolUtils/DrawUtils.ts +++ b/src/SharedToolUtils/DrawUtils.ts @@ -96,7 +96,6 @@ export function drawAtom(thisAtom: AtomNode, color: string, currentAtom: Boolean * @param color Incoming color string. */ export function drawGuidelines(original: Point, current: Point, color: string): void { - console.log("Drawing guidelines"); ctx.beginPath(); ctx.strokeStyle = color; const dx: number = original.x - current.x;