Skip to content

Commit b3143d9

Browse files
committed
:fix: canvas offset scale
1 parent 29ee440 commit b3143d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@litegraph-ts/core",
3-
"version": "0.2.17",
3+
"version": "0.2.18",
44
"description": "A graph node editor similar to PD or UDK Blueprints. It works in an HTML5 Canvas and allows to export graphs to be included in applications.",
55
"source": "src/index.ts",
66
"types": "src/index.ts",

packages/core/src/widgets/DOMWidget.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ function getClipPath(node: LGraphNode, element: HTMLElement) {
5050
selectedNode.pos[0] +
5151
canvas.ds.offset[0] -
5252
MARGIN +
53-
canvas_offset_x,
53+
canvas_offset_x / scale,
5454
y:
5555
selectedNode.pos[1] +
5656
canvas.ds.offset[1] -
5757
LiteGraph.NODE_TITLE_HEIGHT -
5858
MARGIN +
59-
canvas_offset_y,
59+
canvas_offset_y / scale,
6060
width: bounding[2] + MARGIN + MARGIN,
6161
height: bounding[3] + MARGIN + MARGIN,
6262
},

0 commit comments

Comments
 (0)