Skip to content

Conversation

@ADARSHsri2004
Copy link
Contributor

Description

Implemented Pan and Zoom functionality for the Infinite Canvas to improve navigation and usability.

  • Pan: Users can hold the Spacebar and drag the mouse to move around the canvas. The cursor changes to a grabbing 🖐️ icon while panning.
  • Zoom: Users can use the mouse scroll wheel to zoom in and out, centered on the cursor position.
  • State Management: The canvas’s scale (zoom level) and offset (pan position) are managed in the component’s state.
  • Rendering: Drawing tools (pen, shapes, etc.) respect the current zoom and pan state for accurate rendering.

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

Closes #27Implement Pan and Zoom for Infinite Canvas

Checklist

@Ayushivam22 Ayushivam22 merged commit be94f37 into OPCODE-Open-Spring-Fest:main Oct 23, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Implement Pan and Zoom for Infinite Canvas

2 participants