Skip to content

feat(preview): move around the sheet with mouse dragging - #104

Merged
Go2Engle merged 1 commit into
mainfrom
feature/mouse-artboard-panning
Oct 10, 2026
Merged

Go2Engle merged 1 commit into
mainfrom
feature/mouse-artboard-panning

Conversation

@Go2Engle

Copy link
Copy Markdown
Owner

Summary

Move around the sheet preview by dragging empty space with the left mouse button, or by holding the right mouse button and dragging anywhere, including over a selected card. This makes zoomed-in sheets easier to navigate while preserving card selection and artwork inspection.

Type of change

  • Feature
  • Bug fix
  • Refactor
  • Documentation
  • Infrastructure/CI

Technical details

  • Pan the existing preview viewport without changing card placement or print output.
  • Capture the mouse pointer so dragging continues outside the preview; stop on release, cancellation, capture loss, or window blur.
  • Keep ordinary card clicks, keyboard activation, touch input, and native scrollbar interactions available. Suppress context menus and accidental clicks during panning.
  • Measure movement from the drag origin to avoid accumulated rounding drift, and show a grabbing cursor while dragging.
  • Add six interaction regression tests and update the feature reference, Cricut workflow guide, and README workflow.

Testing performed

All 188 tests pass after rebasing onto current main; the production build, formatting, and diff checks pass.

npm test
npm run build
npx prettier --check src/lib/artboard-pan.ts tests/artboard-pan.test.ts src/App.tsx src/style.css
git diff --check origin/main...HEAD

Browser checks verified left dragging on empty space and paper margins, right dragging over a selected card without changing selection, release outside the preview, context-menu suppression, the grabbing cursor, scroll-wheel zoom, and normal card clicks opening artwork inspection.

Breaking changes

None.

Checklist

  • The PR title follows Conventional Commits.
  • I ran npm test and npm run build.
  • I added or updated tests for behavior changes.
  • I updated documentation for user-facing changes.
  • I updated the README workflow; the existing feature summary and screenshot remain applicable.
  • I did not manually edit release versions or CHANGELOG.md.

@Go2Engle
Go2Engle merged commit d94da36 into main Oct 10, 2026
7 checks passed
@Go2Engle
Go2Engle deleted the feature/mouse-artboard-panning branch October 10, 2026 00:57
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.

1 participant