zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.27k stars 233 forks source link

BUG: Scaling and Centering Embedded Files is Broken #2074

Closed not-alaris closed 3 weeks ago

not-alaris commented 1 month ago

Have you searched for existing issues (including closed ones)?

Does this bug persist in a new vault with only Excalidraw installed?

Your environment

SYSTEM INFO: Obsidian version: v1.7.4 Installer version: v1.4.13 Operating system: Darwin Kernel Version 22.6.0: Mon Jun 24 01:25:37 PDT 2024; root:xnu-8796.141.3.706.2~1/RELEASE_X86_64 22.6.0 Login status: logged in Language: en Catalyst license: none Insider build toggle: off Live preview: on Base theme: dark Community theme: Tokyo Night v0.2.5 Snippets enabled: 4 Restricted mode: off Plugins installed: 26 Plugins enabled: 24 1: Auto Link Title v1.5.4 2: Banners v2.0.5-beta 3: Book Search v0.7.5 4: BRAT v1.0.3 5: Calendar v1.5.10 6: Charts v3.9.0 7: Dataview v0.5.67 8: Excalidraw v2.5.2 9: Force note view mode v1.2.2 10: Homepage v4.0.7 11: Math+ v0.7.0 12: Multi-Column Markdown v0.9.1 13: Plugin Update Tracker v1.6.0 14: Sortable v0.3.1 15: Style Settings v1.0.9 16: Table Generator v1.4.1 17: Custom File Explorer sorting v2.1.14 18: Bartender v0.5.14 19: Mousewheel Image zoom v1.0.22 20: Clear Unused Images v1.1.1 21: Obsidian_to_Anki v3.6.0 22: Imgur v2.6.2 23: File Hider v1.1.1 24: Iconize v2.14.4

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

When embedding a excalidraw file to a note, you can no longer use the syntax: ![[imagename|size:300center]] to resize the file and center it. It used to allow this perfectly, until one of the last updates. I'm not sure exactly which, none of the release notes I see mention it either. I'm not sure if this method has been discontinued or changed, but all of my hundreds of files are no longer resized or centered now.

Steps to reproduce

  1. Make a Excalidraw file
  2. Go to an empty note
  3. Link note using ![[imagename|size:400center]] syntax

Expected behavior

Embedded file will both resize and center using that ![[imagename|size:400center]] syntax.

Additional context

No response

zsviczian commented 4 weeks ago

where does size:400center come from?? I don't recall writing such as syntax in any of the documentation, but if yes, please point me to the source so I can clean up the misunderstanding. the correct format is ![[image|400|center]], and it works as expected.

image

not-alaris commented 3 weeks ago

Sorry for the confusion, I had seen some Youtube video about scaling, and that is how they did it. I've looked over the documentation and see that it is incorrect. Thanks for the help.