Open mrakgr opened 1 year ago
For some reason the video doesn't work for me. I will try the repository later
Strange, it does for me. Maybe you could try a different browser?
You can see it in this Youtube video at the specified mark. I'll be using Blazor.Diagrams for the project I am doing so check it out!
Where is the part where you configure the context menu in MudBlazor?
I only used Blazor for the last third of the video, so a minute or two before the mark I linked to you. During the first 2/3rds I've been trying out Bolero before switching to Blazor and redoing the whole project from scratch as it was too difficult to do UI work in Bolero.
Link: https://github.com/mrakgr/helix/blob/zoom-error/Pages/DiagramTrial.razor
Everything related to Blazor.Diagrams
is in this page, the rest are still just the template code.
Hi, looking at the MudMenu Component they're using OffsetX/OffsetY from the mouse event to position their menu. That means when you click on a node, the relative coordinates to that node are used. You can see that when you click on different positions of the node.
I'm not sure what you can do about it, it doesn't look like there is a way you can change that easily.
I'll open an issue on the MudBlazor repo and ask them what they think.
I'll investigate this in the evening, thanks for all the information
hi @mrakgr same issue with Blazor Menu. Have you got a workaround or a fix?
@pfh59 I think what I did was not have it open when clicking on the node. I forgot how I did that by this point though.
I have a MudBlazor menu that is using DiagramCanvas as an activation context which gets triggered on a right click. This works fine when I click on an empty space on a canvas and I've even made it so that I can add nodes using that opened menu. But when I right click on a node, the menu doesn't appear at cursor, but in top left corner instead. Maybe it is getting passed null as the position? Would it be possible to fix that?
https://github.com/Blazor-Diagrams/Blazor.Diagrams/assets/6266635/37f3fd9b-64bc-456f-8ff9-fe8bf704c2a1