Blazor-Diagrams / Blazor.Diagrams

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

Lock nodes and links in a diagram #411

Open Cyrus-Sushiant opened 9 months ago

Cyrus-Sushiant commented 9 months ago

I want to create diagrams with your library. I need a feature to freeze nodes and links until the user after finishing creating diagrams can't change their position of them. Is there such a feature in BlazorDiagram?

Use case

I am building an application that allows users to create and edit diagrams. However, I want to give them the option to lock the diagram once they are done, so that they can't accidentally or intentionally modify it. This would ensure the integrity and consistency of the diagram.

Phloog commented 8 months ago

You can set individual Nodes / Links to "Locked". If you do this programmatically on all elements, and disable deletion using Constraints (in the Diagram Options), you effectively get the desired behaviour.