Skip to content

fix: excalidraw zoom fix#701

Merged
oleeskild merged 5 commits intooleeskild:mainfrom
uroybd:excalidraw-zoom-fix
Jul 7, 2025
Merged

fix: excalidraw zoom fix#701
oleeskild merged 5 commits intooleeskild:mainfrom
uroybd:excalidraw-zoom-fix

Conversation

@uroybd
Copy link
Contributor

@uroybd uroybd commented Jun 21, 2025

This will override the zoom state to 1 to fit the drawing properly on load.

Copilot AI review requested due to automatic review settings June 21, 2025 16:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures the Excalidraw canvas is zoomed to 100% on load by overriding the appState.zoom value.

  • Force appState.zoom to 1 during compilation
  • Ensures drawing fits properly within the viewport
Comments suppressed due to low confidence (1)

src/compiler/ExcalidrawCompiler.ts:59

  • Add or update unit tests to verify that appState.zoom is correctly overridden to 1 during the compilation process.
			excaliDrawJson.appState?.zoom = { value: 1}

@uroybd uroybd force-pushed the excalidraw-zoom-fix branch from 8cc778e to cc934a1 Compare June 22, 2025 07:44
@uroybd
Copy link
Contributor Author

uroybd commented Jun 22, 2025

I'm getting lint errors on files I haven't touched.

@uroybd
Copy link
Contributor Author

uroybd commented Jul 7, 2025

Hello @oleeskild!

Can we get this merged?

@oleeskild oleeskild merged commit 64924dc into oleeskild:main Jul 7, 2025
3 of 4 checks passed
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.

3 participants