feat(Hintergrund): Erstellen, um den Hintergrund von Anmerkungen mit der Eigenschaft MarginRatio zu konfigurieren.

- verschiebt Anmerkungen nach
This commit is contained in:
Developer 02
2025-04-23 15:41:53 +02:00
parent d80fa0b023
commit 32be5077f9
2 changed files with 4 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ public class AnnotationParams
{
public AnnotationParams()
{
_annotationDictionaryInitor = new(() => _annots.ToDictionary(a => a.Name.ToLower(), a => a));
_AnnotationJSObjectInitor = new(() => _annots.ToDictionary(a => a.Name.ToLower(), a => a));
}
public Background? Background { get; init; }
@@ -16,8 +16,6 @@ public class AnnotationParams
private readonly List<Annotation> _annots = new List<Annotation>();
public Annotation this[string name] => _annots.First(a => a.Name == name);
public bool TryGet(string name, out Annotation annotation)
{
#pragma warning disable CS8601 // Possible null reference assignment.
@@ -58,7 +56,7 @@ public class AnnotationParams
}
}
private readonly Lazy<Dictionary<string, Annotation>> _annotationDictionaryInitor;
private readonly Lazy<Dictionary<string, Annotation>> _AnnotationJSObjectInitor;
public Dictionary<string, Annotation> AnnotationDictionary => _annotationDictionaryInitor.Value;
public Dictionary<string, Annotation> AnnotationJSObject => _AnnotationJSObjectInitor.Value;
}