Skip to content

Commit 41c66ce

Browse files
author
Ryan R
authored
Merge pull request #396 from RAIRLab/395-incorrect-ellipse-guidelines
Correct Ellipse Guidelines
2 parents 8d21575 + 337ddd2 commit 41c66ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/SharedToolUtils/DrawUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ export function drawAtom(thisAtom: AtomNode, color: string, currentAtom: Boolean
9898
export function drawGuidelines(original: Point, current: Point, color: string): void {
9999
ctx.beginPath();
100100
ctx.strokeStyle = color;
101-
const dx: number = original.x - current.x + offset.x;
102-
const dy: number = original.y - current.y + offset.y;
103-
ctx.rect(original.x, original.y, -dx, -dy);
101+
const dx: number = original.x - current.x;
102+
const dy: number = original.y - current.y;
103+
ctx.rect(original.x + offset.x, original.y + offset.y, -dx, -dy);
104104
ctx.stroke();
105105
}
106106

0 commit comments

Comments
 (0)