feat(Hintergrund): Erstellen, um den Hintergrund von Anmerkungen mit der Eigenschaft MarginRatio zu konfigurieren.
- verschiebt Anmerkungen nach
This commit is contained in:
parent
d80fa0b023
commit
32be5077f9
@ -18,6 +18,6 @@ public class ConfigController : ControllerBase
|
|||||||
[HttpGet("Annotations")]
|
[HttpGet("Annotations")]
|
||||||
public IActionResult GetAnnotationParams()
|
public IActionResult GetAnnotationParams()
|
||||||
{
|
{
|
||||||
return Ok(_annotParams.AnnotationDictionary);
|
return Ok(_annotParams.AnnotationJSObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@ public class AnnotationParams
|
|||||||
{
|
{
|
||||||
public 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; }
|
public Background? Background { get; init; }
|
||||||
@ -16,8 +16,6 @@ public class AnnotationParams
|
|||||||
|
|
||||||
private readonly List<Annotation> _annots = new List<Annotation>();
|
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)
|
public bool TryGet(string name, out Annotation annotation)
|
||||||
{
|
{
|
||||||
#pragma warning disable CS8601 // Possible null reference assignment.
|
#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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user