Add read-only mode and connection labels.

This commit is contained in:
pk
2026-06-23 06:56:23 +02:00
parent ab325afaa0
commit 88fa815bf5
4 changed files with 28 additions and 5 deletions
+4 -2
View File
@@ -106,7 +106,7 @@ export class TpFlowNode extends LitElement {
return html`
<header drag-node>
A Node
<div class="delete-btn" @click="${this._handleDelete}">✕</div>
${!this.readonly ? html`<div class="delete-btn" @click="${this._handleDelete}">✕</div>` : null}
</header>
`;
}
@@ -122,7 +122,8 @@ export class TpFlowNode extends LitElement {
outputs: { type: Array },
x: { type: Number },
y: { type: Number },
data: { type: Object }
data: { type: Object },
readonly: { type: Boolean, reflect: true }
};
}
@@ -133,6 +134,7 @@ export class TpFlowNode extends LitElement {
this.x = 0;
this.y = 0;
this.data = {};
this.readonly = false;
}
updated(changes) {