Skip to content

Commit

Permalink
Don't process hidden links or reroutes
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-byrne committed Dec 25, 2024
1 parent bc72e3f commit faba453
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/LGraphCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ export class LGraphCanvas {
this.#processNodeClick(e, ctrlOrMeta, node)
} else {
// Reroutes
if (this.reroutesEnabled) {
if (this.reroutesEnabled && this.links_render_mode !== LinkRenderType.HIDDEN_LINK) {
const reroute = graph.getRerouteOnPos(x, y)
if (reroute) {
if (e.shiftKey) {
Expand Down Expand Up @@ -5548,6 +5548,7 @@ export class LGraphCanvas {
drawConnections(ctx: CanvasRenderingContext2D): void {
const rendered = this.renderedPaths
rendered.clear()
if (this.links_render_mode === LinkRenderType.HIDDEN_LINK) return
const visibleReroutes: Reroute[] = []

const now = LiteGraph.getTime()
Expand Down Expand Up @@ -8251,7 +8252,7 @@ export class LGraphCanvas {
menu_info = this.getCanvasMenuOptions()

// Check for reroutes
if (this.reroutesEnabled) {
if (this.reroutesEnabled && this.links_render_mode !== LinkRenderType.HIDDEN_LINK) {
const reroute = this.graph.getRerouteOnPos(event.canvasX, event.canvasY)
if (reroute) {
menu_info.unshift({
Expand Down

0 comments on commit faba453

Please sign in to comment.