How to use the sprotty/lib.isSelectable function in sprotty

To help you get started, we’ve selected a few sprotty examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / graphical-lsp / client / packages / glsp-sprotty / src / features / resize / model.ts View on Github external
export function isResizeable(element: SModelElement): element is SParentElement & BoundsAware {
    return element.hasFeature(resizeFeature) && isBoundsAware(element) && isSelectable(element) && element instanceof SParentElement;
}
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / change-bounds / model.ts View on Github external
export function isResizable(element: SModelElement): element is SParentElement & Resizable {
    return isBoundsAware(element) && isSelectable(element) && element instanceof SParentElement && element.hasFeature(resizeFeature);
}
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / utils / smodel-util.ts View on Github external
export function isSelected(element: SModelElement | undefined): element is SModelElement & Selectable {
    return isNotUndefined(element) && isSelectable(element) && element.selected;
}
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / tools / delete-tool.ts View on Github external
            const deleteElementIds = Array.from(element.root.index.all().filter(e => isDeletable(e) && isSelectable(e) && e.selected)
                .filter(e => e.id !== e.root.id).map(e => e.id));
github eclipsesource / graphical-lsp / client / packages / sprotty-client / src / features / command-palette / command-palette.ts View on Github external
            const selected = toArray(element.root.index.all().filter(e => isSelectable(e) && e.selected)).map(e => e.id);
            return [new ShowDiagramUIExtensionAction(CommandPalette.ID, selected)];