Interface: RailTool
Defined in: interfaces/GraphUI.ts:402
One tool in a rail mode's contextual panel — a row in the panel the mode owns.
'default' is the tool a mode rests on when nothing special is armed (Select's Pointer); 'toggle' arms a modal tool and morphs the rail slot to match it; 'action' runs once and leaves the armed tool alone.
Properties
enabled()?
optionalenabled: () =>boolean
Defined in: interfaces/GraphUI.ts:416
When it returns false the row is disabled. Re-checked on every selection change.
Returns
boolean
icon
icon:
string
Defined in: interfaces/GraphUI.ts:411
An SVG string. It is injected with innerHTML and is not sanitised, so it must come from a source you trust. CSS sizes it to 18px in the panel.
id
id:
string
Defined in: interfaces/GraphUI.ts:404
Stable identity: what the store arms, and the data-tool on the row.
kind
kind:
"toggle"|"default"|"action"
Defined in: interfaces/GraphUI.ts:412
label
label:
string
Defined in: interfaces/GraphUI.ts:406
The row's label, used verbatim (so it can be translated).
run()?
optionalrun: (armed) =>void
Defined in: interfaces/GraphUI.ts:414
Perform the tool's effect. A 'toggle' receives the desired armed state.
Parameters
armed
boolean
Returns
void