|
| 1 | +--- |
| 2 | +title: <Selection />, <Halo /> and <HaloLink /> |
| 3 | +--- |
| 4 | + |
1 | 5 | # Halo and Selection |
2 | 6 |
|
3 | 7 | There are several [canvas widget](/docs/components/canvas.md) components which can be used to display actions on the selected diagram elements or links. |
4 | 8 |
|
5 | 9 | ## Selecting elements |
6 | 10 |
|
7 | | -[Halo](/docs/api/workspace/functions/Halo) widget allows selecting a single element to perform an element action on it. |
| 11 | +[`<Halo />`](/docs/api/workspace/functions/Halo) widget allows selecting a single element to perform an element action on it. |
8 | 12 |
|
9 | | -[Selection](/docs/api/workspace/functions/Selection) widget allows selecting more than one element via rectangular selection box to move them together and perform an element action on them. |
| 13 | +[`<Selection />`](/docs/api/workspace/functions/Selection) widget allows selecting more than one element via rectangular selection box to move them together and perform an element action on them. |
10 | 14 |
|
11 | 15 | There are several built-in element actions that can be used: |
12 | 16 | | Action component | Description | |
13 | 17 | |------------------|-------------| |
14 | | -| [SelectionAction](/docs/api/workspace/functions/SelectionAction.md) | Base component to display a custom element action. | |
15 | | -| [SelectionActionSpinner](/docs/api/workspace/functions/SelectionActionSpinner.md) | Displays a loading spinner (useful as building block for other action components). | |
16 | | -| [SelectionActionRemove](/docs/api/workspace/functions/SelectionActionRemove.md) | [Removes an element](/docs/api/workspace/classes/EditorController.md#removeitems) from the diagram. | |
17 | | -| [SelectionActionZoomToFit](/docs/api/workspace/functions/SelectionActionZoomToFit.md) | Zooms-in or zooms-out the viewport to [fit](/docs/api/workspace/interfaces/CanvasApi.md#zoomtofit) all selected elements. | |
18 | | -| [SelectionActionLayout](/docs/api/workspace/functions/SelectionActionLayout.md) | Performs graph layout algorithm on the sub-graph formed from the selected elements. | |
19 | | -| [SelectionActionExpand](/docs/api/workspace/functions/ToolbarActionExport.md) | Toggles expanded state for the selected elements. | |
20 | | -| [SelectionActionAnchor](/docs/api/workspace/functions/SelectionActionAnchor.md) | Displays a link to the entity IRI. | |
21 | | -| [SelectionActionConnections](/docs/api/workspace/functions/SelectionActionConnections.md) | Opens the [connections menu](/docs/components/connections-menu.md) for the selected entities. | |
22 | | -| [SelectionActionAddToFilter](/docs/api/workspace/functions/SelectionActionAddToFilter.md) | Adds the selected entity to the [instances search](/docs/components/instances-search.md) filter. | |
23 | | -| [SelectionActionGroup](/docs/api/workspace/functions/SelectionActionGroup.md) | [Groups or ungroups](/docs/api/workspace/classes/DataDiagramModel.md#group) selected elements. | |
24 | | -| [SelectionActionEstablishLink](/docs/api/workspace/functions/SelectionActionEstablishLink.md) | Starts [creating a relation](/docs/concepts/graph-authoring.md) to an existing or a new entity by dragging it. | |
| 18 | +| [`<SelectionAction />`](/docs/api/workspace/functions/SelectionAction.md) | Base component to display a custom element action. | |
| 19 | +| [`<SelectionActionSpinner />`](/docs/api/workspace/functions/SelectionActionSpinner.md) | Displays a loading spinner (useful as building block for other action components). | |
| 20 | +| [`<SelectionActionRemove />`](/docs/api/workspace/functions/SelectionActionRemove.md) | [Removes an element](/docs/api/workspace/classes/EditorController.md#removeitems) from the diagram. | |
| 21 | +| [`<SelectionActionZoomToFit />`](/docs/api/workspace/functions/SelectionActionZoomToFit.md) | Zooms-in or zooms-out the viewport to [fit](/docs/api/workspace/interfaces/CanvasApi.md#zoomtofit) all selected elements. | |
| 22 | +| [`<SelectionActionLayout />`](/docs/api/workspace/functions/SelectionActionLayout.md) | Performs graph layout algorithm on the sub-graph formed from the selected elements. | |
| 23 | +| [`<SelectionActionExpand />`](/docs/api/workspace/functions/ToolbarActionExport.md) | Toggles expanded state for the selected elements. | |
| 24 | +| [`<SelectionActionAnchor />`](/docs/api/workspace/functions/SelectionActionAnchor.md) | Displays a link to the entity IRI. | |
| 25 | +| [`<SelectionActionConnections />`](/docs/api/workspace/functions/SelectionActionConnections.md) | Opens the [connections menu](/docs/components/connections-menu.md) for the selected entities. | |
| 26 | +| [`<SelectionActionAddToFilter />`](/docs/api/workspace/functions/SelectionActionAddToFilter.md) | Adds the selected entity to the [instances search](/docs/components/instances-search.md) filter. | |
| 27 | +| [`<SelectionActionGroup />`](/docs/api/workspace/functions/SelectionActionGroup.md) | [Groups or ungroups](/docs/api/workspace/classes/DataDiagramModel.md#group) selected elements. | |
| 28 | +| [`<SelectionActionEstablishLink />`](/docs/api/workspace/functions/SelectionActionEstablishLink.md) | Starts [creating a relation](/docs/concepts/graph-authoring.md) to an existing or a new entity by dragging it. | |
25 | 29 |
|
26 | 30 | ## Selecting links |
27 | 31 |
|
28 | | -[HaloLink](/docs/api/workspace/functions/HaloLink) widget allows selecting a single link to perform a link action on it. |
| 32 | +[`<HaloLink />`](/docs/api/workspace/functions/HaloLink) widget allows selecting a single link to perform a link action on it. |
29 | 33 |
|
30 | 34 | There are several built-in link actions that can be used: |
31 | 35 | | Action component | Description | |
32 | 36 | |------------------|-------------| |
33 | | -| [LinkAction](/docs/api/workspace/functions/LinkAction.md) | Base component to display an action on the selected link. <br/>[useLinkActionContext()](/docs/api/workspace/functions/useLinkActionContext.md) hook can be used to get additional context for the selected link, including path geometry. | |
34 | | -| [LinkActionSpinner](/docs/api/workspace/functions/LinkActionSpinner.md) | Displays a loading spinner (useful as building block for other action components). | |
35 | | -| [LinkActionEdit](/docs/api/workspace/functions/LinkActionEdit.md) | Starts [editing the relation](/docs/concepts/graph-authoring.md). | |
36 | | -| [LinkActionDelete](/docs/api/workspace/functions/LinkActionDelete.md) | Deletes [the relation](/docs/concepts/graph-authoring.md). | |
37 | | -| [LinkActionMoveEndpoint](/docs/api/workspace/functions/LinkActionMoveEndpoint.md) | Displays a handle which allows to [change the relation](/docs/concepts/graph-authoring.md) by moving its endpoint (source or target) to another entity. | |
38 | | -| [LinkActionRename](/docs/api/workspace/functions/LinkActionRename.md) | Starts [renaming a link](/docs/api/workspace/interfaces/RenameLinkProvider.md) (change the label on the diagram only). | |
| 37 | +| [`<LinkAction />`](/docs/api/workspace/functions/LinkAction.md) | Base component to display an action on the selected link. <br/>[`useLinkActionContext()`](/docs/api/workspace/functions/useLinkActionContext.md) hook can be used to get additional context for the selected link, including path geometry. | |
| 38 | +| [`<LinkActionSpinner />`](/docs/api/workspace/functions/LinkActionSpinner.md) | Displays a loading spinner (useful as building block for other action components). | |
| 39 | +| [`<LinkActionEdit />`](/docs/api/workspace/functions/LinkActionEdit.md) | Starts [editing the relation](/docs/concepts/graph-authoring.md). | |
| 40 | +| [`<LinkActionDelete />`](/docs/api/workspace/functions/LinkActionDelete.md) | Deletes [the relation](/docs/concepts/graph-authoring.md). | |
| 41 | +| [`<LinkActionMoveEndpoint />`](/docs/api/workspace/functions/LinkActionMoveEndpoint.md) | Displays a handle which allows to [change the relation](/docs/concepts/graph-authoring.md) by moving its endpoint (source or target) to another entity. | |
| 42 | +| [`<LinkActionRename />`](/docs/api/workspace/functions/LinkActionRename.md) | Starts [renaming a link](/docs/api/workspace/interfaces/RenameLinkProvider.md) (change the label on the diagram only). | |
39 | 43 |
|
40 | 44 | ## Styles |
41 | 45 |
|
|
0 commit comments