From 43db4e275b430dbb9f915c5714d223632725544d Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 20 Mar 2025 12:46:57 +0100 Subject: [PATCH] =?UTF-8?q?fix(Annotation):=20JsonIgnore-Attribut=20zu=20H?= =?UTF-8?q?orBoundAnnot=20und=20VerBoundAnnot=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EnvelopeGenerator.Web/Models/Annotation.cs | 6 +++++- EnvelopeGenerator.Web/Models/AnnotationParams.cs | 4 ++-- EnvelopeGenerator.Web/appsettings.json | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/EnvelopeGenerator.Web/Models/Annotation.cs b/EnvelopeGenerator.Web/Models/Annotation.cs index 6c200a80..e3c21f28 100644 --- a/EnvelopeGenerator.Web/Models/Annotation.cs +++ b/EnvelopeGenerator.Web/Models/Annotation.cs @@ -1,4 +1,6 @@ -namespace EnvelopeGenerator.Web.Models; +using System.Text.Json.Serialization; + +namespace EnvelopeGenerator.Web.Models; public class Annotation { @@ -55,8 +57,10 @@ public class Annotation #endregion #region BoundAnnot + [JsonIgnore] public Annotation? HorBoundAnnot { get; set; } + [JsonIgnore] public Annotation? VerBoundAnnot { get; set; } #endregion }; \ No newline at end of file diff --git a/EnvelopeGenerator.Web/Models/AnnotationParams.cs b/EnvelopeGenerator.Web/Models/AnnotationParams.cs index 2f6d6995..011858cb 100644 --- a/EnvelopeGenerator.Web/Models/AnnotationParams.cs +++ b/EnvelopeGenerator.Web/Models/AnnotationParams.cs @@ -2,11 +2,11 @@ public class AnnotationParams { - private Annotation? DefaultAnnotation { get; init; } + public Annotation? DefaultAnnotation { get; init; } private readonly Dictionary _annots = new(); - public required Dictionary Annots + public required Dictionary Annotations { get => _annots; init diff --git a/EnvelopeGenerator.Web/appsettings.json b/EnvelopeGenerator.Web/appsettings.json index 68165506..aec7c0d7 100644 --- a/EnvelopeGenerator.Web/appsettings.json +++ b/EnvelopeGenerator.Web/appsettings.json @@ -152,17 +152,17 @@ "MainPageTitle": null, "AnnotationParams": { "DefaultAnnotation": { - + "Width": 1, + "Height": 0.5 }, "Annotations": { "Signature": { - }, "City": { - + "VerBoundAnnotName": "Signature" }, "Date": { - + "VerBoundAnnotName": "City" } } }