Repository navigation
Mobile-Touch-Bedienung + Mittelkreis-Halbkreis-Fix - #5
Merged
Merged
Conversation
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.
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.
Fixes
touch-action:noneauf 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.Tests
+5 Regressions-/Renderer-Tests, jeweils gegen den Vor-Fix-Code als rot verifiziert. Volle Suite: 51/51 grün.