fix(Annotation): JsonIgnore-Attribut zu HorBoundAnnot und VerBoundAnnot hinzufügen

This commit is contained in:
Developer 02 2025-03-20 12:46:57 +01:00
parent 353f7698f4
commit 43db4e275b
3 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,6 @@
namespace EnvelopeGenerator.Web.Models; using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Web.Models;
public class Annotation public class Annotation
{ {
@ -55,8 +57,10 @@ public class Annotation
#endregion #endregion
#region BoundAnnot #region BoundAnnot
[JsonIgnore]
public Annotation? HorBoundAnnot { get; set; } public Annotation? HorBoundAnnot { get; set; }
[JsonIgnore]
public Annotation? VerBoundAnnot { get; set; } public Annotation? VerBoundAnnot { get; set; }
#endregion #endregion
}; };

View File

@ -2,11 +2,11 @@
public class AnnotationParams public class AnnotationParams
{ {
private Annotation? DefaultAnnotation { get; init; } public Annotation? DefaultAnnotation { get; init; }
private readonly Dictionary<string, Annotation> _annots = new(); private readonly Dictionary<string, Annotation> _annots = new();
public required Dictionary<string, Annotation> Annots public required Dictionary<string, Annotation> Annotations
{ {
get => _annots; get => _annots;
init init

View File

@ -152,17 +152,17 @@
"MainPageTitle": null, "MainPageTitle": null,
"AnnotationParams": { "AnnotationParams": {
"DefaultAnnotation": { "DefaultAnnotation": {
"Width": 1,
"Height": 0.5
}, },
"Annotations": { "Annotations": {
"Signature": { "Signature": {
}, },
"City": { "City": {
"VerBoundAnnotName": "Signature"
}, },
"Date": { "Date": {
"VerBoundAnnotName": "City"
} }
} }
} }