Skip to content

(Pet Frames) Fix RIGHT anchor misalignment in ATTACHED and GROUPED modes#71

Merged
DanderBot merged 1 commit into
DanderBot:mainfrom
Krathe82:fix/pet-frame-right-anchor-alignment
May 11, 2026
Merged

(Pet Frames) Fix RIGHT anchor misalignment in ATTACHED and GROUPED modes#71
DanderBot merged 1 commit into
DanderBot:mainfrom
Krathe82:fix/pet-frame-right-anchor-alignment

Conversation

@Krathe82

@Krathe82 Krathe82 commented May 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Two related issues with the RIGHT pet anchor, both in Frames/Pets.lua:

1. GROUPED + VERTICAL: container anchored to wrong frame (main bug)

In UpdatePetGroupLayout, the anchor == "RIGHT" + partyGrowth == "VERTICAL" branch was anchoring the pet container to bottommostFrame instead of topmostFrame. This placed the entire pet container below the party stack rather than alongside it. The LEFT anchor case correctly uses topmostFrame; this makes RIGHT symmetric with it.

2. Inverted offsetX sign on all RIGHT anchor paths

All three RIGHT anchor SetPoint calls used -offsetX, meaning a positive Offset X value moved the pet toward the owner rather than away from it. Fixed to use offsetX directly (no negation), so positive Offset X consistently nudges the pet rightward (more gap) — the intuitive behaviour for an Offset X slider when the pet is positioned to the right.

Affected paths:

  • PositionPetFrame — ATTACHED mode (line 704)
  • UpdatePetGroupLayout — GROUPED + HORIZONTAL (line 886)
  • UpdatePetGroupLayout — GROUPED + VERTICAL (line 888)

Addresses the issue reported in https://discord.com/channels/1443538945605636149/1500157530763165696. Also supersedes PR #68 which fixes the bottommostFrame issue alone.

Test plan

  • GROUPED mode, RIGHT anchor, VERTICAL party growth — pet container sits alongside the party stack at the correct vertical position
  • GROUPED mode, RIGHT anchor, HORIZONTAL party growth — pet container is correctly placed to the right
  • ATTACHED mode, RIGHT anchor — individual pet frames sit to the right of their owner frames
  • Non-zero Offset X with RIGHT anchor — positive value increases the gap (pet moves right), negative closes it

In GROUPED+VERTICAL mode, the pet container was anchored to the
bottommost party frame instead of the topmost, placing it below the
party stack entirely. Fixed to use topmostFrame, mirroring the LEFT
anchor case symmetrically.

Also removes the -offsetX negation on all RIGHT anchor paths (ATTACHED,
GROUPED+HORIZONTAL, GROUPED+VERTICAL) so that a positive Offset X value
nudges the pet rightward (away from the party), consistent with how
Offset X behaves in other anchor directions.
@DanderBot

Copy link
Copy Markdown
Owner

Thanks for the PR! Merged into main and will ship in the next alpha build.

DanderBot added a commit that referenced this pull request May 11, 2026
@Krathe82 Krathe82 deleted the fix/pet-frame-right-anchor-alignment branch June 4, 2026 12:42
Krathe82 pushed a commit to Krathe82/DandersFrames that referenced this pull request Jun 6, 2026
…hor-alignment

(Pet Frames) Fix RIGHT anchor misalignment in ATTACHED and GROUPED modes
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.

2 participants