×N fly-to sometimes landed in a blank area far below the tree. Cause: family-chart cardToMiddle scales datum.x by the zoom k but notdatum.y (y = height/2 - datum.y, missing the ·k), so vertical centering is only correct at k=1 and drifts by datum.y·(k−1) otherwise — worse the deeper the person sits (hence "way below the tree", and it only worked near 1:1). Fix: pre-multiply the y passed to cardToMiddle by the current scale, cancelling the missing ·k. x was already correct. Frontend only.
`×N` fly-to sometimes landed in a blank area far below the tree. **Cause:** family-chart `cardToMiddle` scales `datum.x` by the zoom `k` but **not** `datum.y` (`y = height/2 - datum.y`, missing the `·k`), so vertical centering is only correct at `k=1` and drifts by `datum.y·(k−1)` otherwise — worse the deeper the person sits (hence "way below the tree", and it only worked near 1:1). **Fix:** pre-multiply the `y` passed to `cardToMiddle` by the current scale, cancelling the missing `·k`. `x` was already correct. Frontend only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Clicking ×N sometimes flew to a blank area far below the tree. Cause:
family-chart's cardToMiddle scales datum.x by the zoom factor k but not datum.y
(`y = height/2 - datum.y`, missing the ·k), so vertical centering is only
correct at k=1 and drifts by datum.y·(k−1) at any other zoom — worse the deeper
the person sits. That's why it worked only when the view happened to be near 1:1.
Compensate by pre-multiplying the y we pass to cardToMiddle by the current
scale, cancelling the library's missing ·k. x was already correct.
Signed-off-by: Justin Paul <[email protected]>
justin
merged commit 3731d77d4b into main2026-06-11 08:58:38 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
×Nfly-to sometimes landed in a blank area far below the tree. Cause: family-chartcardToMiddlescalesdatum.xby the zoomkbut notdatum.y(y = height/2 - datum.y, missing the·k), so vertical centering is only correct atk=1and drifts bydatum.y·(k−1)otherwise — worse the deeper the person sits (hence "way below the tree", and it only worked near 1:1). Fix: pre-multiply theypassed tocardToMiddleby the current scale, cancelling the missing·k.xwas already correct. Frontend only.🤖 Generated with Claude Code