← Cycles
Qflow · c1

Zoom Pan

archivedcreated 2026-02-18· last activity 2026-08-15

Zoom controls, responsive canvas, and pulse alignment fix

New in this cycle: Scroll-to-zoom and click-drag panning on a responsive canvas

Why

The visualization appeared zoomed in with no way to adjust the view. The canvas was hardcoded to 800x440px. This cycle adds scroll-to-zoom (toward cursor), click-drag panning, makes the canvas fill its container, and fixes pulse line alignment.

Objective

Add zoom/pan controls and make the canvas responsive.

Scope

  • dev/experiments/c1.zoom-pan/

Key Changes

  • Added enableZoom(canvas) — scroll-to-zoom centered on cursor
  • Added enablePan(canvas) — click-drag with 4px dead-zone
  • Added fitToContent() / resetView() — auto-scale and center content
  • Canvas reads container dimensions instead of hardcoded 800x440
  • holder.isRenderGroup = true — fixes PixiJS 8 transform propagation
  • Manual bounds computation from node positions

Outcome

Zoom, pan, and fit-to-content all work. Key discovery: PixiJS 8's default render group on app.stage doesn't properly propagate transform updates to dynamically added children. Setting isRenderGroup = true on the zoom/pan container fixes it. Also discovered that getLocalBounds() on a scaled container can corrupt PixiJS 8's transform cache.

Visual record

9 captures — heroes, page slices, and full-page renders. Click to view.

Default framing, playback running
Default framing, playback running
Wheel zoom in — sources fill the frame
Wheel zoom in — sources fill the frame
Close zoom — individual node detail
Close zoom — individual node detail
Drag-pan toward the destination arc
Drag-pan toward the destination arc
Pan vertically while zoomed
Pan vertically while zoomed
Wheel zoom out past default
Wheel zoom out past default
Wide framing — the whole flow field small in frame
Wide framing — the whole flow field small in frame
Re-centered after zoom/pan excursion
Re-centered after zoom/pan excursion
c1 hero

Artifacts

/experiments/c1.zoom-pan/ (local dev)

Qpoint Brand Style Guide