Skip to content

Commit 7294580

Browse files
authored
docs(Diagram): Add info about panning and selection (#3373)
* docs(Diagram): Add info about panning and selection * Update components/diagram/overview.md * Update components/diagram/overview.md
1 parent f1b8fec commit 7294580

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

components/diagram/overview.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,38 @@ The Diagram allows users to zoom the graph in and out for better perception. The
228228
MinZoom="0" />
229229
````
230230

231+
## Pan
232+
233+
The Diagram content may overflow the component boundaries if there are a lot of shapes or if the user zooms in. By default, the Diagram allows users to pan the content by holding the `Ctrl` key and dragging. The following code snippet shows the relevant parameters together with their default values.
234+
235+
When both panning and [selection](#select) are enabled, make sure the two features use a different `Key`.
236+
237+
>caption Pan-related Diagram parameters
238+
239+
````RAZOR.skip-repl
240+
<TelerikDiagram>
241+
<DiagramPannable Enabled="true" Key="@DiagramPannableKey.Ctrl" />
242+
</TelerikDiagram>
243+
````
244+
245+
## Select
246+
247+
Users can select a single shape or connection with a click. The Diagram also supports multiple selection through dragging a rectangular marquee. The following code snippet shows the relevant parameters together with their default values.
248+
249+
Once the user selects some shapes and connections, they can drag them to another position or remove them with the `Del` key.
250+
251+
When both [panning](#pan) and selection are enabled, make sure the two features use a different `Key`.
252+
253+
>caption Selection-related Diagram parameters
254+
255+
````RAZOR.skip-repl
256+
<TelerikDiagram>
257+
<DiagramSelectable Enabled="true" Multiple="true" Key="@DiagramSelectableKey.None">
258+
<DiagramSelectableStroke Color="black" DashType="@DashType.Dash" Width="1" />
259+
</DiagramSelectable>
260+
</TelerikDiagram>
261+
````
262+
231263
## Events
232264

233265
The Telerik Diagram fires events that enable the app to detect and react to user interactions with the component. Find out more about the [Diagram events and event arguments](slug:diagram-events).

0 commit comments

Comments
 (0)