Skip to content

v0.3.1

tagged this 17 May 20:48
The 0.3.0 fast-pan installer probed for `viewer.drawer.draw`, but
OSD 4.1.x's canvas drawer exposes `.update()` — no `.draw()`
method on the drawer object. The check silently early-returned,
so `:pan_optimized={true}` never engaged for anyone on the OSD
version Fresco pins to. The new `fast-pan` event was never fired;
Etcher 0.2.8's listener sat unused; the perf win that motivated
the release didn't materialize.

This patch is a no-op unless you're on `:pan_optimized` — in
which case it switches you from "silently inert" to "actually
engaged."

- `installFastPan` (`priv/static/fresco.js`): probe for both
  `drawer.update` and `drawer.draw`, suppress whichever exists.
  OSD 4.1.x uses `update`; older / custom drawers may still
  use `draw`. Being defensive about both means future drawer
  revisions don't break the fast path the same way.
- `commitFastPan`: trigger the post-pan repaint via
  `viewer.forceRedraw()` (stable OSD public API) instead of
  calling the (potentially-renamed) drawer method directly.
- Added `console.warn` on every silent-bail path
  (`installFastPan` early returns + `startFastPan` early
  returns). Previously, if the install failed, the consumer had
  zero signal. Now developers see exactly why the fast path
  didn't engage.

No public API changes — `:pan_optimized` and `fast-pan` surface
identical to 0.3.0. Etcher 0.2.8 listener unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Assets 2
Loading