-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WI00761833 - Updates for Blazor Diagrams mouse configuration #45
WI00761833 - Updates for Blazor Diagrams mouse configuration #45
Conversation
shams-azam-wtg
commented
Jul 9, 2024
- Added documentation for scroll behavior
- Fixed scrolling of page with diagram when scrolling insied a diagrm by adding a js function in script.js to implement preventDefault.
- updated minimized js of script.js to script.min.js as just adding to script.js was not working when tested locally.
Diagram.UnregisterBehavior<WheelBehavior>(); | ||
Diagram.RegisterBehavior(new ScrollBehavior(Diagram)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not enable scroll on wheel behavior.
We need to use the diagram BehaviorOptions
to configure what action scrolls the diagram. I think BehaviorOptions
is what we need to document here.
e.g. to scroll on wheel for a diagram, use _diagram.BehaviorOptions.DiagramWheelBehavior = _diagram.GetBehavior<ScrollBehavior>();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Shams, the functionality works well now, nice work.
I think we can improve the documentation some more.
@@ -114,6 +114,19 @@ Diagram.UnregisterBehavior<SelectionBehavior>(); | |||
Diagram.RegisterBehavior(new MySelectionBehavior(Diagram)); | |||
</code></pre> | |||
|
|||
<h2>Using Different Behaviors</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Different Behaviors
seems like a duplicate of the above section, Replacing a behavior
. I think what we really want to document here is how to configure behaviors use DiagramBehaviorOptions
which is a class we added. This class allows the user to configure some of the standard behaviors to be on different inputs. This is different to using a different behavior
/replacing a behavior
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check with Matt if not sure how DiagramBehaviorOptions
works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.