Blazor-Diagrams / Blazor.Diagrams

A fully customizable and extensible all-purpose diagrams library for Blazor
https://blazor-diagrams.zhaytam.com
MIT License
919 stars 176 forks source link

Exception gets thrown when zooming in and out of the canvas #322

Open mrakgr opened 1 year ago

mrakgr commented 1 year ago

Here is what happens when I try zooming in and out. I'll prepare the repo in case you want to check it out.

https://github.com/Blazor-Diagrams/Blazor.Diagrams/assets/6266635/4b066a22-b33e-493d-a563-f25f33ba975c

zHaytam commented 1 year ago

Hey, what version are you using? And please try disabling Virtualization.

mrakgr commented 1 year ago

Repo: https://github.com/mrakgr/helix/tree/zoom-error

<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

    <PropertyGroup>
        <TargetFramework>net7.0</TargetFramework>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
        <LangVersion>11</LangVersion>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.5" />
        <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.5" PrivateAssets="all" />
        <PackageReference Include="MudBlazor" Version="6.2.5" />
        <PackageReference Include="Z.Blazor.Diagrams" Version="2.1.6" />
    </ItemGroup>

</Project>

The dotnet SDK version I am using is 7.0.302. I'll try disabling virtualization as soon as I figure what that is.

mrakgr commented 1 year ago

I am confused, is virtualization something that the MudBlazor components are using under the hood? How do I turn that off?

zHaytam commented 1 year ago

Virtualization in Diagram options

mrakgr commented 1 year ago

Yeah, that helped a lot. I can't get it to trigger anymore.

zHaytam commented 1 year ago

Great. It should be fixed in the new version without disabling this option.

240026763 commented 11 months ago

@mrakgr, I have been using Blazor Diagrams with Mudblazor for awhile now and have seen the same issue. I recommend changing to the 3.0 beta releases. It plays much nicer with the MudBlazor component library.