You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/components/canvas.md
+37-6Lines changed: 37 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ title: Canvas
4
4
5
5
# Canvas Components
6
6
7
-
[Canvas](/docs/api/workspace/functions/Canvas) is a main component to display a scrollable canvas for the diagram with [elements](/docs/concepts/diagram-model.md), [links](/docs/concepts/diagram-model.md) and additional widgets.
7
+
[Canvas](/docs/api/workspace/functions/Canvas) is a main component to display a scrollable canvas for the diagram with [elements](/docs/concepts/graph-model.md), [links](/docs/concepts/graph-model.md) and additional widgets.
8
+
9
+
## Hooks
8
10
9
11
[useCanvas()](/docs/api/workspace/functions/useCanvas) hook called from a canvas widget, [SharedCanvasState.findAnyCanvas()](/docs/api/workspace/classes/SharedCanvasState.md#findanycanvas) or [SharedCanvasState.findAllCanvases()](/docs/api/workspace/classes/SharedCanvasState.md#findallcanvases) methods can be used to get the [CanvasApi](/docs/api/workspace/interfaces/CanvasApi) instance to read or subscribe to the canvas state or perform viewport-related effects.
10
12
@@ -14,20 +16,49 @@ To define a custom canvas widget, the target React component should be marked by
Copy file name to clipboardExpand all lines: docs/components/class-tree.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
[ClassTree](/docs/api/workspace/functions/ClassTree.md) is a component to display an [element type](/docs/api/workspace/type-aliases/ElementTypeIri.md) (class) tree for the workspace.
4
4
5
-
Element type graph is loaded from [data provider](/docs/concepts/data-provider.md) associated with the [diagram model](/docs/concepts/workspace-context.md).
5
+
Element type graph is loaded from [data provider](/docs/concepts/data-provider.md) associated with the [diagram model](/docs/concepts/graph-model.md).
6
6
7
7
In [graph authoring](/docs/concepts/graph-authoring.md) mode, the class tree can be used to create entity elements that are instances of the displayed types.
8
8
@@ -11,3 +11,33 @@ In [graph authoring](/docs/concepts/graph-authoring.md) mode, the class tree can
11
11
The same functionality is also available as `SearchSectionElementTypes`[unified search section](/docs/components/unified-search.md).
Copy file name to clipboardExpand all lines: docs/components/dialog.md
+42-25Lines changed: 42 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,35 +4,52 @@ title: Dialog
4
4
5
5
# Dialog system
6
6
7
-
It is possible to show a dialog either attached to target [element](/docs/concepts/diagram-model.md), [link](/docs/concepts/diagram-model.md) or as a modal over the canvas viewport itself.
7
+
It is possible to show a dialog either attached to target [element](/docs/concepts/graph-model.md), [link](/docs/concepts/graph-model.md) or as a modal over the canvas viewport itself.
8
8
9
-
[OverlayController.showDialog()](/docs/api/workspace/classes/OverlayController#showdialog) opens a dialog with the specified style and content.
9
+
The following methods and properties from [OverlayController](/docs/api/workspace/classes/OverlayController) (accessible from [workspace context](/docs/concepts/workspace-context.md)) provide means to interact with the dialogs:
10
10
11
-
[OverlayController.hideDialog()](/docs/api/workspace/classes/OverlayController#hideDialog) hides a currently open dialog.
12
-
13
-
[OverlayController.openedDialog](/docs/api/workspace/classes/OverlayController#openeddialog) property and corresponding [change event](/docs/api/workspace/interfaces/OverlayControllerEvents.md) can be used to read the state of the currently open dialog.
11
+
| Method or property | Description |
12
+
|--------------------|-------------|
13
+
|[showDialog()](/docs/api/workspace/classes/OverlayController#showdialog) method | Opens a dialog with the specified style and content. |
14
+
|[hideDialog()](/docs/api/workspace/classes/OverlayController#hidedialog) method | Hides a currently open dialog. |
15
+
|[openedDialog](/docs/api/workspace/classes/OverlayController#openeddialog) property | Can be used to read the state of the currently open dialog. <br/> Has corresponding [changeOpenedDialog](/docs/api/workspace/interfaces/OverlayControllerEvents.md) event. |
Copy file name to clipboardExpand all lines: docs/components/unified-search.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,16 @@
2
2
3
3
[UnifiedSearch](/docs/api/workspace/functions/UnifiedSearch.md) is a component to display a search input with a dropdown for results.
4
4
5
+
## Hooks
6
+
7
+
[useUnifiedSearchSection()](/docs/api/workspace/functions/useUnifiedSearchSection.md) hook can be used to implement a custom search section.
8
+
9
+
## Search sections
10
+
5
11
One or many available search sections (providers) can be specified:
6
12
7
13
| Section component | Description |
8
14
|-------------------|-------------|
9
15
|[SearchSectionElementTypes](/docs/api/workspace/functions/SearchSectionElementTypes.md)| Allows to lookup entity types displayed in the tree form and create new entities in [authoring mode](/docs/concepts/graph-authoring.md). |
10
16
|[SearchSectionEntities](/docs/api/workspace/functions/SearchSectionEntities.md)| Allows to lookup entities using [data provider](/docs/concepts/data-provider.md). |
11
17
|[SearchSectionLinkTypes](/docs/api/workspace/functions/SearchSectionLinkTypes.md)| Allows to lookup displayed link types and change their [visibility settings](/docs/api/workspace/classes/DiagramModel.md#getlinkvisibility). |
12
-
13
-
[useUnifiedSearchSection()](/docs/api/workspace/functions/useUnifiedSearchSection.md) hook can be used to implement a custom search section.
Copy file name to clipboardExpand all lines: docs/components/visual-authoring.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
[VisualAuthoring](/docs/api/workspace/functions/VisualAuthoring) component is a [canvas widget](/docs/components/canvas.md) to provide UI for the [visual graph authoring](/docs/concepts/graph-authoring.md).
4
4
5
-
:::note
5
+
:::important
6
6
7
-
`VisualAuthoring` widget must be provided to the canvas to display visual graph authoring UI.
7
+
`VisualAuthoring` widget must be provided to the canvas to in order to display visual graph authoring UI.
Copy file name to clipboardExpand all lines: docs/components/workspace.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ title: Workspace
6
6
7
7
[Workspace](/docs/api/workspace/classes/Workspace) is a top-level component which establishes [workspace context](/docs/api/workspace/interfaces/WorkspaceContext), which stores graph data and provides means to display and interact with the diagram.
8
8
9
+
## Hooks
10
+
9
11
[useLoadedWorkspace()](/docs/api/workspace/functions/useLoadedWorkspace) hook should be used to perform an initial initialization for the workspace which correctly reverts the changes and aborts async operations via provided [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) when the workspace component is unmounted.
10
12
11
13
[useWorkspace()](/docs/api/workspace/functions/useWorkspace) hook can be used from inside `<Workspace>` child components to access workspace context.
Copy file name to clipboardExpand all lines: docs/concepts/canvas-coordinates.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,27 @@ sidebar_position: 6
4
4
5
5
# Canvas Coordinates
6
6
7
+
Reactodia uses different coordinate systems when dealing with infinitely-resizable and scalable canvas content.
8
+
7
9
## Coordinate types
8
10
9
-
| Type | Description |
11
+
| Type | Description |
10
12
|-------------------|-------------|
11
-
| paper | Main coordinates system for diagram element positions and sizes — unlimited in size, always in 1:1 scale with element and link templates. |
12
-
| scrollable pane | Represents scaled paper layer — unlimited in size, natively scrolled inside viewport container. |
13
+
| paper | Main coordinates system for [diagram content](/docs/concepts/graph-model.md) (elements, links, etc) — unlimited in size, always in 1:1 scale with element and link templates. |
14
+
| scrollable pane | Represents scaled but still unlimited in size layer, natively scrolled inside viewport container. <br/> It is possible to use [totalPaneSize()](/docs/api/workspace/functions/totalPaneSize.md) and [paneTopLeft()](/docs/api/workspace/functions/paneTopLeft.md) to get current pane bounds with the same coordinates type. |
13
15
| client (viewport) | Represents fixed-size "window" into visible graph area, equal to [DOM client coordinates](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth) for the [Canvas](/docs/components/canvas) component. |
14
-
| page | Same as [DOM page coordinates](https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems#page). |
16
+
| page | Same as [DOM page coordinates](https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems#page) — generally used when handling pointer-related events. |
Copy file name to clipboardExpand all lines: docs/concepts/graph-authoring.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ sidebar_position: 7
4
4
5
5
# Graph Authoring
6
6
7
-
This page describes visual graph authoring mechanism to edit the graph data: create, update or delete [entities and relations](/docs/concepts/diagram-model.md).
7
+
This page describes visual graph authoring mechanism to edit the graph data: create, update or delete [entities and relations](/docs/concepts/graph-model.md).
0 commit comments