PhoenixKit 2.64.1: The avatar crop editor pans and zooms properly again
PhoenixKit 2.64.1 fixes the avatar crop editor, where the picture froze after the first move of a drag.
The drag lost the size of the crop frame, so every later move produced an invalid focal point and the picture stopped where it was. A mouse or a single finger now pans the whole way in every direction, still stopping at the picture’s edge.
Zoom works better too. The mouse wheel and a trackpad zoom toward the point under the cursor, in proportion to how far they turn, instead of in fixed steps around the focal point. On a phone, two fingers pinch around their midpoint and pan as it moves, and the slider zooms around the centre of the frame. Saved crops are stored the same way, so existing avatars look as before.
No migration: the fix is in phoenix_kit.js, which the next compile copies into your app.
Full release notes: PhoenixKit 2.64.1
2.64.1 · 24 October 2026
No migration (still V223). Ships PR #982’s avatar crop editor fix.
Fixed
- The avatar crop editor pans again (#982). After the first move of a drag the picture froze where it was: the
drag state lost the frame’s size, and every later move computed a
NaNfocal point. One pointer (mouse or a finger) now pans the whole way in every direction, clamped at the picture’s edge as before.
Changed
- Avatar crop zoom follows the cursor and the fingers (#982). The wheel and a trackpad zoom toward the point under
the cursor, in proportion to how far they turned (a trackpad pinch,
ctrlKey, too), instead of fixed 8% steps about the focal point; two fingers on a phone pinch about their midpoint and pan as it moves; the slider zooms about the frame’s centre. The stored crop and its layout are unchanged, so saved avatars render as before. - The
AvatarCrophook’s drag, wheel and pinch gestures are covered by JS tests (test/js/avatar_crop.test.cjs).
PhoenixKit 2.64.1. Install or update: {:phoenix_kit, "~> 2.64"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.