Blazor-Diagrams / Blazor.Diagrams

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

Lock nodes and links in a diagram #411

Open Cyrus-Sushiant opened 4 months ago

Cyrus-Sushiant commented 4 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 4 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.