mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-27 11:27:21 -06:00
anchor_factors resolved the x and y axes independently and with different matching rules (x looked for a capitalised "Left"/"Right" or the exact word, y for a lowercase "top"/"bottom" prefix). A misspelling matched one rule and missed the other, so "topleft" anchored top-centre and "TopLeft" left-centre -- anchors the command does not offer -- with no error. Match the anchor exactly against the nine documented values via one ANCHORS table; anything else is a BadParams error naming `anchor` and listing them, as #507 settled for other command params. The nine valid values keep the exact factors they had, and an omitted anchor still means center. Test covers the nine offsets, the omitted default, and the misspellings from the issue ("topleft", "TopLeft", "TOPLEFT", "bottomleft", "bottomright", "middle", "", "NOPE"). Fixes #2946. Co-authored-by: photocraft-agent UNCONFIGURED <unconfigured@invalid.local>