diff --git a/src/Blazor.Diagrams/Components/DiagramCanvas.razor.cs b/src/Blazor.Diagrams/Components/DiagramCanvas.razor.cs index 815e29be..a6bfda57 100644 --- a/src/Blazor.Diagrams/Components/DiagramCanvas.razor.cs +++ b/src/Blazor.Diagrams/Components/DiagramCanvas.razor.cs @@ -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() != null) + if (BlazorDiagram.BehaviorOptions.DiagramWheelBehavior is ScrollBehavior) { await JSRuntime.AddDefaultPreventingForWheelHandler(elementReference); }