mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-10-20 05:06:31 +00:00
Node selection only worked through the canvas click handler, but onTouchStart calls preventDefault() to stop page scroll/zoom, which also suppresses the browser-synthesized click. A single-finger touch went straight into panning, so on phones and tablets tapping a node did nothing: no selection, no popover, no way to open a document from the graph. Detect taps from the raw touch lifecycle instead: remember where the single-finger touch started, cancel the tap once the finger moves more than 10px or a second finger lands, and on release hit-test the start point through the viewport transform and forward the result to onNodeClick. Tapping empty space clears the selection, matching mouse behaviour. Covered with unit tests driving the handler through a stub canvas: tap on node, tap on empty space, jitter within the slop threshold, pan, pinch, and a tap through a zoomed/panned viewport. |
||
|---|---|---|
| .. | ||
| agent-framework-python | ||
| ai-sdk | ||
| cartesia-sdk-python | ||
| docs-test | ||
| hooks | ||
| lib | ||
| memory-graph | ||
| openai-sdk-python | ||
| pipecat-sdk-python | ||
| tools | ||
| ui | ||
| validation | ||