mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 21:37:00 +08:00
Litegraph centerOnNode DPI fix
This commit is contained in:
parent
73ca780019
commit
70e1772840
@ -7559,11 +7559,11 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
this.ds.offset[0] =
|
this.ds.offset[0] =
|
||||||
-node.pos[0] -
|
-node.pos[0] -
|
||||||
node.size[0] * 0.5 +
|
node.size[0] * 0.5 +
|
||||||
(this.canvas.width * 0.5) / this.ds.scale;
|
(this.canvas.width * 0.5) / (this.ds.scale * window.devicePixelRatio);
|
||||||
this.ds.offset[1] =
|
this.ds.offset[1] =
|
||||||
-node.pos[1] -
|
-node.pos[1] -
|
||||||
node.size[1] * 0.5 +
|
node.size[1] * 0.5 +
|
||||||
(this.canvas.height * 0.5) / this.ds.scale;
|
(this.canvas.height * 0.5) / (this.ds.scale * window.devicePixelRatio);
|
||||||
this.setDirty(true, true);
|
this.setDirty(true, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user