zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.07k stars 221 forks source link

BUG: zooming in from separate window doesn't stay centered on cursor #1869

Closed clehene closed 2 months ago

clehene commented 3 months ago

Your environment SYSTEM INFO: Obsidian version: v1.6.5 Installer version: v1.4.13 Operating system: Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 23.5.0 Login status: logged in Catalyst license: supporter Insider build toggle: on Live preview: on Base theme: light Community theme: Minimal v7.3.2 Snippets enabled: 2 Restricted mode: off Plugins installed: 39 Plugins enabled: 7 1: Hotkeys for templates v1.4.3 2: Automatically reveal active file v1.0.2 3: Style Settings v1.0.8 4: Wrap with shortcuts v1.3.0 5: Git v2.24.3 6: Quick Switcher++ v4.3.0 7: Excalidraw v2.2.8

RECOMMENDATIONS: Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets. Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Describe the bug Normally when I zoom in, the zoomed area stays centered on the cursor position. However, when Excalidraw is in a separate window than the main Obsidian window, when I zoom in (in particular I'm doing pinch and zoom on trackpad) instead of zooming in on the cursor, the view gets centered on some other location.

To Reproduce

  1. Open a diagram
  2. Click on tab and choose "Move to new window"
  3. Zoom out
  4. Move cursor to an area
  5. Zoom in
  6. The zoomed in view doesn't respect the previous cursor position

Expected behavior Zooming in should stay centered on the cursor, just like it does when running Excalidraw in the main window.

clehene commented 2 months ago

closing as it seems transient, can't reproduce