diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index 67d3ed3919..06c46da354 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -76,8 +76,8 @@ /> - - + + diff --git a/src/components/graph/SelectionRectangle.vue b/src/components/graph/SelectionRectangle.vue index 512e70c06d..4078279e68 100644 --- a/src/components/graph/SelectionRectangle.vue +++ b/src/components/graph/SelectionRectangle.vue @@ -1,7 +1,7 @@ diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts index af0da27ca7..64c78797d0 100644 --- a/src/lib/litegraph/src/LGraphCanvas.ts +++ b/src/lib/litegraph/src/LGraphCanvas.ts @@ -4796,30 +4796,6 @@ export class LGraphCanvas implements CustomEventDispatcher this.#renderSnapHighlight(ctx, highlightPos) } - // Area-selection rectangle - // In Vue nodes mode, selection rectangle is rendered in DOM layer - if (this.dragging_rectangle && !LiteGraph.vueNodesMode) { - const { eDown, eMove } = this.pointer - ctx.strokeStyle = '#FFF' - - if (eDown && eMove) { - // Do not scale the selection box - const transform = ctx.getTransform() - const ratio = Math.max(1, window.devicePixelRatio) - ctx.setTransform(ratio, 0, 0, ratio, 0, 0) - - const x = eDown.safeOffsetX - const y = eDown.safeOffsetY - ctx.strokeRect(x, y, eMove.safeOffsetX - x, eMove.safeOffsetY - y) - - ctx.setTransform(transform) - } else { - // Fallback to legacy behaviour - const [x, y, w, h] = this.dragging_rectangle - ctx.strokeRect(x, y, w, h) - } - } - // on top of link center if ( !this.isDragging &&