timescale.info
Sign inSign up

How OpenChronology was built

Every merged pull request of openchronology/timeline-app, its first week of commits and its releases; and before them the 2020 PureScript editor, from snapshots of its deleted repositories in the Wayback Machine. Written to this server through the HTTP API.

327 moments · 2020-03-09T00:15:08Z CE – 2026-11-02T20:11:21Z CE · by @athan · @athan

#17 · Choose one pinch behaviour per touch gesture

  • timeline-app
  • pull request

A two-finger pinch zoomed time by the horizontal distance between the fingers and, at the same time, resized the whole interface by the vertical distance. Real pinches are rarely perfectly horizontal, so drift scaled the interface instead of only zooming. Each gesture now chooses one behaviour when the second finger lands: - **Side by side (up to 60° from horizontal):** zooms time by the full finger distance. Vertical drift no longer resizes anything. - **Stacked vertically (within 30° of vertical):** resizes the timeline contents and leaves the time span unchanged. Both modes still pan with the fingers' midpoint. Lifting a finger falls back to one-finger panning. **Orientation:** directions are measured in the page's current layout, which already rotates with the device, so portrait and landscape behave the same without reading the device orientation. A resize or rotation mid-gesture restarts the gesture from the new layout. **Tests:** the Chromium touch test now adds a drifting diagonal pinch (time zooms, interface size is unchanged) and a vertical pinch (interface resizes, time span is unchanged). The diagonal case fails on the previous code, which scaled the interface to its 300% limit. Locally, the unit tests and the Chromium browser suite pass.

Sources

Open #17 · Choose one pinch behaviour per touch gesture in the timeline