Skip to content

Anchor v2.2.1: selection-based parenting, transform fix, lockMovement, --up/--down#2270

Open
KenanMillet wants to merge 4 commits into
Roll20:masterfrom
KenanMillet:Anchor-v2.2-clean
Open

Anchor v2.2.1: selection-based parenting, transform fix, lockMovement, --up/--down#2270
KenanMillet wants to merge 4 commits into
Roll20:masterfrom
KenanMillet:Anchor-v2.2-clean

Conversation

@KenanMillet

Copy link
Copy Markdown
Contributor

Summary

Selection-based parenting, directional disambiguation, and a scale/flip transform fix.

v2.2.0 — Selection-Based Parenting

  • First selected token = parent, rest = children (no ID required)
  • --new flag: force auto-create invisible anchor (all selected = children)
  • --persist: keep auto-created anchors when childless
  • --up/--down modifiers for remove, lock, unlock, track, untrack, center
  • Disambiguation required when token is both parent and child
  • remove from parent unanchors all children
  • --persist and --ignore-selected as preferred -- syntax (bare words still work)

v2.2.1 — Transform Fix + lockMovement

  • Fix: child position offset now scales with parent size (proper TRS matrix transform)
  • Fix: flip mirroring handled via negative scale in transform matrix
  • Auto lockMovement when both left+top are tracked AND locked
  • lockMovement cleared when conditions no longer hold (untrack, unlock, remove)
  • State migration: old pixel offsets auto-normalized on first load (schemaVersion check)

Tested

  • Selection-based anchoring (multi-select, single select, --new)
  • Parent scale propagates to child offset distance
  • Flip mirrors child position correctly
  • remove/lock/unlock/track/untrack/center with --up/--down
  • lockMovement set/cleared correctly
  • State migration from v2.1.0

Breaking Changes

  • Stored offsets are now anchor-size-relative (auto-migrated on first load)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant