v0.4.7
tagged this
21 May 12:02
Shapes on a hidden image no longer leak into adjacent viewport
bands on multi-image <Fresco.canvas> hosts. Paged readers, spreads,
and lookbooks lay every page out side-by-side on one canvas and
call handle.setImageVisible(id, false) to hide non-active pages —
before this release the page imgs were hidden but their shapes
stayed visible, ghost-rendering inside the surrounding canvas-space
the host exposes via page-padding bands.
- New `image_id` field on canvas-mode annotations. When a shape
is finalized on a multi-image canvas (getImages().length > 1),
its centroid is hit-tested against every image rect and the
matching id is recorded on shape.image_id + emitted in
etcher:annotations-changed. Shapes that land in empty canvas
space get no image_id and behave like always.
- Single-image canvas consumers are unaffected — the length > 1
gate skips the lookup entirely.
- Etcher subscribes to Fresco 0.5.5's `image-visibility-change`
and toggles display:none on shapes whose image_id is in the
hidden set (plus their title satellites). Hidden shapes that
were being edited drop out of edit mode; hidden shapes with a
pinned tooltip unpin — both states would otherwise float with
no visible anchor.
- Seeds initial state via handle.getHiddenImageIds() so an
extension mounting after the host already toggled images off
still picks up the current visibility.
Requires Fresco ~> 0.5.5. Older Fresco gracefully degrades — the
wiring no-ops and shapes still leak into hidden-image bands as
before.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>