Skip to content

@eightkk/vue-weave / core / GraphPaletteItem

Interface: GraphPaletteItem<D> ​

Defined in: src/core/diagramEditor.ts:19

One template of GraphPalette. D types the optional data payload; it defaults to unknown.

Type Parameters ​

D ​

D = unknown

Properties ​

data? ​

optional data?: D

Defined in: src/core/diagramEditor.ts:36

Application data. It travels in the drag payload as JSON, so keep it JSON-safe.


detail? ​

optional detail?: string

Defined in: src/core/diagramEditor.ts:24

Shown under the label and searched by the filter box.


disabled? ​

optional disabled?: boolean

Defined in: src/core/diagramEditor.ts:34

True lists the item but keeps it from being dragged or inserted.


id ​

id: string

Defined in: src/core/diagramEditor.ts:21

Unique within the palette; the drag payload and the insert event carry it.


keywords? ​

optional keywords?: readonly string[]

Defined in: src/core/diagramEditor.ts:32

Extra words the filter box matches, besides the label, detail and section.


label ​

label: string

Defined in: src/core/diagramEditor.ts:22


section? ​

optional section?: string

Defined in: src/core/diagramEditor.ts:30

The heading of the section the item is listed under. Sections appear in the order of their first item.


shape? ​

optional shape?: NetworkNodeShape

Defined in: src/core/diagramEditor.ts:26

The node outline drawn in the preview. Default 'box'.


tone? ​

optional tone?: ChartTone

Defined in: src/core/diagramEditor.ts:28

The tone of the preview. Default 'blue'.

Released under the MIT License.