mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 15:10:06 +00:00
Fix Selection Marquee display is offset when DPI < 1 (#692)
Fixes https://github.com/Comfy-Org/ComfyUI_frontend/issues/2481. The canvas scaling behavior is not consistent with DPI which is the source of many bugs. To verify, add console log somewhere:
This commit is contained in:
@@ -4179,7 +4179,7 @@ export class LGraphCanvas implements ConnectionColorContext {
|
||||
if (eDown && eMove) {
|
||||
// Do not scale the selection box
|
||||
const transform = ctx.getTransform()
|
||||
const ratio = window.devicePixelRatio
|
||||
const ratio = Math.max(1, window.devicePixelRatio)
|
||||
ctx.setTransform(ratio, 0, 0, ratio, 0, 0)
|
||||
|
||||
const x = eDown.safeOffsetX
|
||||
|
||||
Reference in New Issue
Block a user