feat: add p-rec-annot line-number apply preflight
This commit is contained in:
@@ -59,6 +59,7 @@ public sealed record LineNumberCandidate(string StableId, long RowId, Annotation
|
||||
public sealed record ExistingLineNumberAnnotation(string StableId, string SourceStableId, string Text);
|
||||
public sealed record LineNumberCommandOperation(string StableId, AnnotationOperationKind Kind, string? Text, AnnotationPoint Position, double Rotation, string Layer, string TextStyle, IReadOnlyList<string> Reasons);
|
||||
public sealed record LineNumberCommandPlan(IReadOnlyList<LineNumberCommandOperation> Operations);
|
||||
public sealed record LineNumberApplyPreflight(string StableId, string Text, AnnotationPoint Position, double Rotation, string Layer, string TextStyle);
|
||||
|
||||
public sealed record GeometrySnapshot
|
||||
{
|
||||
|
||||
@@ -17,4 +17,9 @@ public sealed class LineNumberCommandPlanner(ILineNumberAnnotationFormatter form
|
||||
}
|
||||
return new(result);
|
||||
}
|
||||
|
||||
public static IReadOnlyList<LineNumberApplyPreflight> PrepareApply(LineNumberCommandPlan plan) => plan.Operations
|
||||
.Where(x => x.Kind is AnnotationOperationKind.Create or AnnotationOperationKind.Update)
|
||||
.OrderBy(x => x.StableId, StringComparer.Ordinal)
|
||||
.Select(x => new LineNumberApplyPreflight(x.StableId, x.Text!, x.Position, x.Rotation, x.Layer, x.TextStyle)).ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user