Skip to content

Commit 6dbdb9b

Browse files
authored
Fix clientX/Y offset calculation (#248)
1 parent 3e3e909 commit 6dbdb9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2957,7 +2957,7 @@ export class ComfyApp {
29572957
const rect = this.canvasContainer.getBoundingClientRect()
29582958
const containerOffsets = [rect.left, rect.top]
29592959
return _.zip(pos, this.canvas.ds.offset, containerOffsets).map(
2960-
([p, o1, o2]) => p / this.canvas.ds.scale - o1 - o2
2960+
([p, o1, o2]) => (p - o2) / this.canvas.ds.scale - o1
29612961
) as Vector2
29622962
}
29632963
}

0 commit comments

Comments
 (0)