From 09f824d23dd0dd08d8c244e8580f6ba35995c4d2 Mon Sep 17 00:00:00 2001 From: Shams Azam Date: Thu, 11 Jul 2024 11:38:23 +0530 Subject: [PATCH] updated documentation for BehaviorOptions. --- site/Site/Pages/Documentation/Diagram/Behaviors.razor | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/site/Site/Pages/Documentation/Diagram/Behaviors.razor b/site/Site/Pages/Documentation/Diagram/Behaviors.razor index ff9a5f7d..094b3311 100644 --- a/site/Site/Pages/Documentation/Diagram/Behaviors.razor +++ b/site/Site/Pages/Documentation/Diagram/Behaviors.razor @@ -114,13 +114,14 @@ Diagram.UnregisterBehavior<SelectionBehavior>(); Diagram.RegisterBehavior(new MySelectionBehavior(Diagram)); -

Using Different Behaviors

+

Configure behaviors for different actions on input

-You can use the following ways to add different behaviors to the diagram. +You can configure a behavior to perform different actions for an input. Such as scrolling a diagram on mouse wheel instead of zooming in and out. +This can be done using the BehaviorOptions. See the below example. -

Scroll Behavior

+

Scrolling a diagram on mouse wheel

-

To scroll the diagram using the mouse wheel use ScrollBehavior.

+

To scroll a diagram using the mouse wheel set the DiagramWheelBehavior property of BehaviorOptions to use ScrollBehavior.


 _diagram.BehaviorOptions.DiagramWheelBehavior = _diagram.GetBehavior<ScrollBehavior>();