Add read-only mode and connection labels.
This commit is contained in:
+4
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user