Skip to content

Fix selection/gesture bugs; add rhombus & clipboard paste (Ctrl/Cmd+V) - #14

Open
Dcode9 wants to merge 3 commits into
mainfrom
codex/fix-syntax-error-and-add-rhombus
Open

Fix selection/gesture bugs; add rhombus & clipboard paste (Ctrl/Cmd+V)#14
Dcode9 wants to merge 3 commits into
mainfrom
codex/fix-syntax-error-and-add-rhombus

Conversation

@Dcode9

@Dcode9 Dcode9 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Fix a runtime-breaking inline script syntax error and harden selection/shape behavior for rotated quadrilaterals.
  • Make the quadrilateral tool usable (add visible rhombus) and improve UX for copy/paste and multi-pointer workflows.
  • Ensure touch gestures behave intuitively in split view (three-finger swipe to exit when already split).

Description

  • Removed a stray token that caused an inline script parse error in index.html and cleaned up the modal promise handler.
  • Added a labeled rhombus option in the quadrilateral picker (◇ Rhombus) so rhombus creation is discoverable.
  • Reworked bounds/rotation math by introducing getStrokeLocalBounds and a rotated getStrokeBounds, and updated selection overlay/handles to draw and snap correctly around rotated shapes (uses rotatePointAround / pointToStrokeLocal).
  • Implemented selection clipboard helpers copySelectedStrokes and pasteSelectedStrokes, wired them to the context menu and keyboard shortcuts (Ctrl/Cmd+C, Ctrl/Cmd+V), and ensure pasted objects are offset and selected.
  • Hid the pen/touch assignment dot indicators until both pointer types are observed in the session using a detectedToolPointerTypes set.
  • Changed three-finger gesture handling so a three-finger swipe will exitSplitView() if already split, otherwise it creates a split as before.

Testing

  • Extracted inline scripts from index.html and ran node --check on each extracted inline script; checks passed.
  • Ran node --check on JS files including assets/js/app.js, test.js, and API handlers; checks passed.
  • Ran git diff --check to ensure no trailing whitespace/merge markers; check passed.
  • Launched a static server with python3 -m http.server and fetched index.html via curl -I which returned HTTP 200 OK.
  • Attempted browser-based screenshot capture but no Chromium/Chrome binary is available in the environment (warning only).

Codex Task

@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
whiteboard Ready Ready Preview, Comment Jun 6, 2026 3:24pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant