UNPKG

@selenite/graph-editor

Version:

A graph editor for visual programming, based on rete and svelte.

23 lines (22 loc) 603 B
import { Node } from '../Node.svelte'; export class GetNameNode extends Node { constructor({ factory }) { super({ label: 'Get Name', factory }); this.oldAddInData({ name: 'xml', displayName: 'XML', socketLabel: 'XML', type: 'xmlElement:*' }); this.oldAddOutData({ name: 'name', displayName: 'Name', socketLabel: 'Name', type: 'groupNameRef' }); } data(inputs) { const xml = this.getData('xml', inputs); return { name: xml?.name }; } }