Skip to content

Commit

Permalink
fixed scroll behavior checking for preventing default wheel behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
shams-azam-wtg committed Jul 10, 2024
1 parent 3d0517e commit 98da37e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Blazor.Diagrams/Components/DiagramCanvas.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
{
BlazorDiagram.SetContainer(await JSRuntime.GetBoundingClientRect(elementReference));
await JSRuntime.ObserveResizes(elementReference, _reference!);
if (BlazorDiagram.GetBehavior<ScrollBehavior>() != null)
if (BlazorDiagram.BehaviorOptions.DiagramWheelBehavior is ScrollBehavior)
{
await JSRuntime.AddDefaultPreventingForWheelHandler(elementReference);
}
Expand Down

0 comments on commit 98da37e

Please sign in to comment.