Selection Menu
The selection menu options configure the menu shown when elements are selected.
By default:
- Selection menu is enabled.
- Any additional custom actions are added after the default actions.
Usage
<Shift>+Click— Add to selection<Alt>+Click— Start a new selection<Ctrl>+Click— Remove from selection
Try it out!
Disabling the selection menu
Pretty straightforward by setting the enabled property to false.
ts
const options = {
UI: {
selectionMenu: {
enabled: false
}
}
}Additional actions
You can configure additional actions to be displayed when multiple nodes are selected.
The interface for action items are defined here.
ts
const options = {
UI: {
selectionMenu: {
menuNode: {
topbar: [
{
text: 'Delete Node',
variant: 'danger',
onclick: (evt) => console.log('Delete')
}
],
menu: [
{
text: 'Log Nodes',
variant: 'primary',
onclick: (evt) => console.log('Log')
}
]
}
}
}
}