Skip to content

Mobile-Touch-Bedienung + Mittelkreis-Halbkreis-Fix - #5

Merged
OliEder merged 2 commits into
mainfrom
claude/app-review-Oy0Ta
May 30, 2026
Merged

OliEder merged 2 commits into
mainfrom
claude/app-review-Oy0Ta

Conversation

@OliEder

@OliEder OliEder commented May 30, 2026

Copy link
Copy Markdown
Contributor

Fixes

  • Touch-Bedienung (iPhone/iPad): Objekte ließen sich nicht verschieben — touch-action:none auf dem Court, großzügigere Trefferradien für Finger (42 statt 15 Einheiten), und ein per Menü gestartetes Dribbling/Pass beginnt jetzt automatisch beim ausgewählten Spieler.
  • Court-Rendering: Der Mittelkreis-Halbkreis im Halffeld wurde nach außen statt ins Spielfeld gezeichnet (SVG-Sweep-Flag).

Tests

+5 Regressions-/Renderer-Tests, jeweils gegen den Vor-Fix-Code als rot verifiziert. Volle Suite: 51/51 grün.

claude added 2 commits May 30, 2026 06:55
The half-court view cuts the center circle at the midcourt line, but the arc
used sweep-flag 0, so it bulged away from the court (outside, below the
midline) instead of into the playing area. Flip to sweep-flag 1 so the drawn
half lies inside the court, toward the basket.

Test: renderer.spec.js locates the center-circle arc by its endpoints on the
midcourt line and asserts it bulges into the court (sweep=1).
…m the player

Three mobile/UX issues reported on iPhone:

- Entities could not be dragged at all: #court-svg had no touch-action, so the
  browser claimed the finger gesture for scrolling and fired pointercancel
  before a drag began. Set touch-action:none on the court.

- Hit targets were too small for a finger: the hit radius was 15 viewBox units
  (~token size, ~8 CSS px on a phone). Thread the radius through _hitTestEntity
  and use a generous 42-unit radius for touch (22 for mouse/pen).

- Starting a draw tool (dribble/pass/etc.) on a selected player did not use the
  player as the first waypoint, so the line began nowhere near them. Add
  EditorState.startLineTool(tool, entityKey), which seeds the entity position as
  waypoint 1 and sets from_entity; the context-menu tool buttons use it.

Tests: regressions for touch-action:none, an off-center finger tap still
grabbing/dragging a token, and a line started from the selected player (via
startLineTool and the context-menu button). openEditor resets the editorState
singleton so tests are order-independent.
@OliEder
OliEder merged commit 32d9111 into main May 30, 2026
3 checks passed
@OliEder
OliEder deleted the claude/app-review-Oy0Ta branch May 30, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants