Feat(Canvas): Add canvas zoom on Ctrl/Cmd+MMB drag. by DustyShoe · Pull Request #8965 · invoke-ai/InvokeAI

Conversation

@DustyShoe

Summary

This PR improves canvas UX for graphics tablet users by adding support for the widely used Ctrl/Cmd+MMB zoom gesture.

  • Added canvas zoom on Ctrl/Cmd+MMB.
  • Zoom uses continuous scaling without snap points.
  • Zoom is anchored to the cursor position at drag start.
  • Added custom cursor.

QA Instructions

  1. Open the canvas and use Ctrl/Cmd+MMB drag; verify vertical drag zooms in and out.
  2. Verify the zoom is smooth and does not snap to preset zoom levels.
  3. Start zooming over a visible detail and verify the zoom stays anchored around the initial cursor position.
  4. Release MMB and verify zoom mode exits cleanly.
  5. Switch focus away during the gesture and verify zoom mode is cancelled cleanly.
  6. Verify the custom zoom cursor is shown during Ctrl/Cmd+MMB drag.

Merge Plan

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • ❗Changes to a redux slice have a corresponding migration
  • Documentation added / updated (if applicable)
  • Updated What's New copy (if doing a release after this PR)

Labels

1 participant

@DustyShoe