feat: port p-rec-annot ortho viewport maintenance foundation
This commit is contained in:
@@ -49,6 +49,16 @@ internal sealed class LineConnectionAnnotationWriter
|
||||
attribute.LayerId = layers[assets.TextLayer]; attribute.TextStyleId = styles[assets.TextStyle];
|
||||
attribute.UpdateMTextAttribute(); reference.AttributeCollection.AppendAttribute(attribute); transaction.AddNewlyCreatedDBObject(attribute, true);
|
||||
}
|
||||
if (plan.ConnectorPosition is { } connector)
|
||||
{
|
||||
using var leader = new Polyline(3) { LayerId = layers[assets.PolylineLayer], XData = Ownership(viewportStableId, plan) };
|
||||
leader.AddVertexAt(0, new Point2d(connector.X, connector.Y), 0, 0, 0);
|
||||
// Legacy PXP-ALC uses an orthogonal two-segment leader. Its
|
||||
// elbow shares the annotation Y coordinate for a stable route.
|
||||
leader.AddVertexAt(1, new Point2d(connector.X, plan.Position.Y), 0, 0, 0);
|
||||
leader.AddVertexAt(2, new Point2d(plan.Position.X, plan.Position.Y), 0, 0, 0);
|
||||
paper.AppendEntity(leader); transaction.AddNewlyCreatedDBObject(leader, true);
|
||||
}
|
||||
}
|
||||
transaction.Commit();
|
||||
return new(deleted, insertable.Length);
|
||||
|
||||
Reference in New Issue
Block a user