From ba9f946b0ad113c983779f56b5811c283f4663f3 Mon Sep 17 00:00:00 2001 From: pk Date: Sat, 18 Oct 2025 22:49:03 +0200 Subject: [PATCH] Fix connection-removed event data --- connections.js | 2 +- tp-flow-nodes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/connections.js b/connections.js index a71a562..29f33e1 100644 --- a/connections.js +++ b/connections.js @@ -346,7 +346,7 @@ export const connections = function(superClass) { if (connection) { this._dispatchChangeEvent({ type: 'connection-removed', - data: { connectionId } + data: connection }); } diff --git a/tp-flow-nodes.js b/tp-flow-nodes.js index aa69b07..4c996a9 100644 --- a/tp-flow-nodes.js +++ b/tp-flow-nodes.js @@ -240,7 +240,7 @@ export class TpFlowNodes extends zoom(panning(connections(LitElement))) { _dispatchChangeEvent(detail = {}) { this.dispatchEvent(new CustomEvent('flow-changed', { detail: { - type: detail.type, // Type of change: 'node-added', 'node-removed', 'node-moved', 'connection-added', 'node-data-changed'. + type: detail.type, // Type of change: 'node-added', 'node-removed', 'node-moved', 'connection-added', 'connection-removed', 'node-data-changed'. data: detail.data, }, bubbles: true,