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

ShouldDeleteNode Constraint is not checked by the default RemoveControl , it bypass it. any workaround possible ? #359

Closed mahartaimurlak closed 8 months ago

mahartaimurlak commented 8 months ago

i have implemented ShouldDeleteNode Constraint for the node , it works fine when i press delete button and it raise ShouldDeleteNode constraint properly ,

Now i added the RemoveControl on node to remove it provided with the library, RemoveControl does remove node but don't raise ShouldDeleteNode constraint so it delete nodes which even i don't want user to delete by checking in constrain.

is there any workaround for it or how to fix it.

thanks in advance :)

mahartaimurlak commented 8 months ago

thanks bro , i have created a custom actionable control and its fine with me , thanks alot. however just as a standard behaviour , probably your shouldDeleteNode must be called always before deltions.

zHaytam commented 8 months ago

I will re-open this just because I consider it as a bug.
I am glad you figured how to work around it, but I will need to fix it in the library!