Skip to content

feat: DXF attachment anchoring, stable attachment switching, and empty-line layout bounds#12

Merged
mlightcad merged 1 commit into
mainfrom
feat/anchor
May 16, 2026
Merged

feat: DXF attachment anchoring, stable attachment switching, and empty-line layout bounds#12
mlightcad merged 1 commit into
mainfrom
feat/anchor

Conversation

@mlightcad
Copy link
Copy Markdown
Owner

@mlightcad mlightcad commented May 16, 2026

Summary

  • Adds initialAttachmentPoint (DXF group 71) to MTextInputBoxOptions and exposes getMTextAttachmentPoint() so callers can align editor creation with MTEXT attachment semantics.
  • Positions the editor’s MTEXT column using attachment-aware local X (attachmentColumnMinLocal), consistent with mtext-renderer / MText.calculateAnchorPoint frame conventions (left / center / right columns and baseline variants).
  • When the ribbon attachment changes, adjusts position (and cursor view transform) so the on-screen text frame stays fixed while the insertion anchor updates.
  • Improves vertical chrome bounds by unioning the layout container with empty logical cursor lines only, preserving trailing blank rows without reintroducing oversized renderer line strips on non-empty rows.
  • Bumps @mlightcad/mtext-input-box to 0.2.10.
  • Consolidates the Vitest @mlightcad/mtext-renderer mock (removes duplicate vi.mock) and adds coverage for top-right column offset and unionLayoutContainerWithCursorLines behavior.

@mlightcad mlightcad self-assigned this May 16, 2026
@mlightcad mlightcad added the enhancement New feature or request label May 16, 2026
@mlightcad mlightcad merged commit da97c35 into main May 16, 2026
4 checks passed
@mlightcad mlightcad deleted the feat/anchor branch May 16, 2026 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant