Skip to content

Commit

Permalink
:fix: canvas offset scale
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed May 26, 2024
1 parent 29ee440 commit b3143d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@litegraph-ts/core",
"version": "0.2.17",
"version": "0.2.18",
"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.",
"source": "src/index.ts",
"types": "src/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/widgets/DOMWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ function getClipPath(node: LGraphNode, element: HTMLElement) {
selectedNode.pos[0] +
canvas.ds.offset[0] -
MARGIN +
canvas_offset_x,
canvas_offset_x / scale,
y:
selectedNode.pos[1] +
canvas.ds.offset[1] -
LiteGraph.NODE_TITLE_HEIGHT -
MARGIN +
canvas_offset_y,
canvas_offset_y / scale,
width: bounding[2] + MARGIN + MARGIN,
height: bounding[3] + MARGIN + MARGIN,
},
Expand Down

0 comments on commit b3143d9

Please sign in to comment.