cap: slide-up-to-zoom while holding record + iOS app cache/tap fixes
cap.mjs — gesture extension on top of hold-to-record:
- New zoom state (1.0 – 4.0×) with a zoomStartY anchored at touch-down.
On 'draw' events while recording, dy = (zoomStartY - e.y) is mapped
through zoomSensitivity (240 px / unit) and clamped to [1, 4].
Anchoring to absolute startY (rather than accumulating per-event
deltas) lets the user freely swing up and down without drift.
- paint() now passes the zoom factor to paste(frame, x, y, zoom) and
recenters the offset so the camera image stays anchored to screen
center as it grows. Off-screen pixels clip naturally.
- Recording hint reads "● rec 2.3× — release to stop" once zoom is
active, and a slim red bar on the right edge fills upward to give
tactile feedback for the slide gesture.
- zoom + zoomStartY reset on lift so the next hold starts at 1×.
ContentView.swift (iOS app) — landed via subagent earlier in this
session, included here so the commit is one cohesive afternoon's work:
- Wider WKWebsiteDataStore wipe (adds IndexedDBDatabases +
WebSQLDatabases) plus URLCache.shared.removeAllCachedResponses() so
the SW's precache manifest can't rehydrate from leftover IndexedDB
state on next launch.
- Top-level URLRequest now uses .reloadIgnoringLocalAndRemoteCacheData
and appends ?_iosbust=<unix> to defeat any cache key (CDN / SW
cache.match) that ignores Cache-Control.
- webView.scrollView.delaysContentTouches = false (and
canCancelContentTouches = false) so the very first tap on the
WKWebView isn't swallowed by UIScrollView's ~150ms gesture-recognition
delay. Canonical fix used by other JS-canvas iOS apps.