Skip to content

feat: Added support middle mouse drag and command zoom in the canvas#5

Open
BartInTheField wants to merge 3 commits intoceIia:mainfrom
BartInTheField:feature/middle-mouse-drag-upstream
Open

feat: Added support middle mouse drag and command zoom in the canvas#5
BartInTheField wants to merge 3 commits intoceIia:mainfrom
BartInTheField:feature/middle-mouse-drag-upstream

Conversation

@BartInTheField
Copy link
Copy Markdown

@BartInTheField BartInTheField commented Apr 1, 2026

Summary

  • Add middle-mouse drag to pan the canvas, matching the interaction model used by Figma and other spatial tools
  • Hold the Command key and scroll the mouse wheel to zoom in/out, anchored at the cursor position.
  • Update README to document the new input method

Changes

  • CanvasView.swift: Added otherMouseDown, otherMouseDragged, and otherMouseUp overrides to handle middle-mouse button (button 2) drag panning with a closed-hand
    cursor during drag
  • README.md: Added middle-mouse drag to the canvas description and shortcuts table, added explanation about command zoom behaviour

Comment thread README.md Outdated
BartInTheField and others added 2 commits April 2, 2026 14:00
Removed 'like Figma' for clarity in usage instructions.
Hold the Command key and scroll the mouse wheel to zoom in/out,
anchored at the cursor position. Matches Figma-style zoom behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@BartInTheField BartInTheField requested a review from ceIia April 2, 2026 12:12
@BartInTheField BartInTheField changed the title feat: Added support middle mouse drag of the canvas like Figma feat: Added support middle mouse drag and command zoom in the canvas Apr 2, 2026
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