Repository navigation
fix(fx): make ADSR knots reliably grabbable on mobile - #11
< 8000 /span>Merged
Merged
Conversation
Knots pinned at their data-maximum (sustain=1 hugged the LCD top, max attack/release hugged the bezel) were nearly impossible to grab on phones — half the r=14 hit-area was clipped by the SVG bezel and the finger covered the visible dot. Three combined changes: - computeAdsrGeom now reserves an inner-padding inset (PAD_X/PAD_Y), so a knot at any data-extreme stays visibly inside the LCD with breathing room for the touch target. - The SVG gets overflow="visible" so the invisible hit-circle can extend past the LCD bezel — a finger landing a few px outside the glass still grabs. - A new PlotProxyZone renders behind the AdsrNodes and grabs the nearest knot when the user taps anywhere on the LCD. Removes the need for finger-precision; tapping in the general area is enough. Drag logic refactored into a useAdsrDrag hook so the per-knot nodes and the plot-wide proxy share one start-snapshot and active-axis controller. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ADSR-Knots im FX-LCD waren auf Mobile kaum bedienbar, sobald sie ihr Datenmaximum erreichten — bei
sustain=1klebte der D/S-Knot oben auf der Bezel-Kante, der r=14 Hit-Kreis wurde halb vom SVG-Defaultoverflow:hiddenabgeschnitten, und der Finger verdeckte den 5 px großen Dot komplett.Drei kombinierte Fixes:
computeAdsrGeom) — neuePAD_X/PAD_YInsets (6/8 auf Mobile, 4/4 auf Desktop) sorgen dafür, dass ein Knot an jedem Daten-Extremum sichtbar innerhalb des LCD bleibt. Origin (ox/oy) wandert mit,buildAdsrPathundcurvePointAtTimelesen den neuen Origin aus dem Geom statt hardcodiertem(0, plotH).overflow="visible"auf der SVG — der unsichtbare Hit-Kreis darf jetzt über die LCD-Bezel hinausragen, falls der Finger 1–2 px daneben landet.PlotProxyZone— eine plot-weite<rect>Touch-Surface unter den AdsrNodes, die per Distanz-Check den nächstgelegenen Knot grabbt und denselben Drag-Loop ansteuert. Damit muss der Finger den Dot überhaupt nicht mehr treffen — irgendwo in der Nähe tippen reicht. SVG-Paint-Order sorgt dafür, dass direkte Knot-Treffer weiterhin Vorrang haben.Drag-Logik in einen
useAdsrDragHook extrahiert, den die per-Knot-Nodes und die Proxy-Zone gemeinsam nutzen — single source of truth fürstartRefund Active-Axis.Test plan
sustain=1(oben) undsustain=0(unten) — beide müssen visuell deutlich vom Bezel abgesetzt sein und greifbar bleibensustain=1an der oberen Kante)🤖 Generated with Claude Code