Blazor.Diagrams icon indicating copy to clipboard operation
Blazor.Diagrams copied to clipboard

Exception gets thrown when zooming in and out of the canvas

Open mrakgr opened this issue 2 years ago • 7 comments

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

mrakgr avatar May 24 '23 12:05 mrakgr

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

zHaytam avatar May 24 '23 12:05 zHaytam

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 avatar May 24 '23 13:05 mrakgr

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

mrakgr avatar May 24 '23 13:05 mrakgr

Virtualization in Diagram options

zHaytam avatar May 24 '23 13:05 zHaytam

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

mrakgr avatar May 24 '23 13:05 mrakgr

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

zHaytam avatar May 24 '23 13:05 zHaytam

@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.

240026763 avatar Jul 21 '23 16:07 240026763