From 01055a35100d00e60455d92d714ee9782d54d14f Mon Sep 17 00:00:00 2001 From: vcarlucci <33085651+vcarlucci@users.noreply.github.com> Date: Tue, 18 Mar 2025 21:46:46 +0100 Subject: [PATCH] Update Model.cs to allow manipulation of the object Id There are numerous scenarios where recovering a diagram from a JSON file and saving it back is necessary. To support this functionality, assigning custom 'Id' values is essential. It is, however, the responsibility of the custom implementation to ensure that each 'Id' is unique. --- src/Blazor.Diagrams.Core/Models/Base/Model.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Blazor.Diagrams.Core/Models/Base/Model.cs b/src/Blazor.Diagrams.Core/Models/Base/Model.cs index 738b4509..03c7bbca 100644 --- a/src/Blazor.Diagrams.Core/Models/Base/Model.cs +++ b/src/Blazor.Diagrams.Core/Models/Base/Model.cs @@ -16,7 +16,7 @@ protected Model(string id) public event Action? Changed; public event Action? VisibilityChanged; - public string Id { get; } + public string Id { get; set; } public bool Locked { get; set; } public bool Visible {