Acylation / obsidian-chem

Chemistry support for Obsidian. Rendering SMILES strings into chemistry structures.
MIT License
86 stars 4 forks source link

Problem when rendering H2 #72

Open Pythame opened 7 months ago

Pythame commented 7 months ago

What do you need to help with?

I supposed that H2 ("[H][H]" in smiles) should be rendered as "H-H", but the plugin gives nothing but a blank.

Acylation commented 7 months ago

Thanks for reporting, I see some bug in the console, when I try to read style.width while it's an infinity. Will draft a quick fix.

However, considering the two-atom molecule, smiles-drawer failed to render the horizontal line. See #35. Switch to rdkit would solve if it fits your cases.

Update: debugging on package version based on the online demo https://codepen.io/Acylation/pen/VwNNbrm?editors=1000