Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Mermaid View doesn't work in a seperate window- #535

Open
Friedolito opened this issue Apr 21, 2024 · 7 comments
Open

Bug: Mermaid View doesn't work in a seperate window- #535

Friedolito opened this issue Apr 21, 2024 · 7 comments
Labels
bug Something isn't working view:codeblock:mermaid

Comments

@Friedolito
Copy link

When having a seperate window in obsmd, the mermaid view isn't rendered and gives error:

Error parsing Mermaid diagram!
Cannot read properties of null (reading 'getBoundingClientRect')

Screenshot -2024-04-21 at 15 22 36@2x

obsmd: Current version: v1.5.12
breadcrumbs: Version: 4.0.107-beta

Not impairing much, but maybe good to know :)
And love the function!

@Friedolito Friedolito added the bug Something isn't working label Apr 21, 2024
@SkepticMystic
Copy link
Owner

Hey, thanks for the issue :)
Please can you share a bit more info. If you go to BC Settings > Debug, then change Log Level to DEBUG, you'll see the mermaid code printed to the console. Can you share what gets logged when this error happens

@Friedolito
Copy link
Author

Is this right?
Screenshot -2024-04-21 at 15 33 32@2x

@SkepticMystic
Copy link
Owner

Indeed, thank you! Can you copy-paste the mermaid code here.

@Friedolito
Copy link
Author

%%{init: {"flowchart": {"defaultRenderer": "dagre"}} }%%
graph LR
   0("Enzymklasse")
   1("Hydrolasen")
   2("Isomerasen")
   3("Ligase")
   4("Lyasen")
   5("Oxireduktasen")
   6("Phosphatasen")
   7("Telomerase")
   8("Kinasen")
   9("AMP-abhängige Kinase")
   10("Glukokinase")
   11("Hexokinase")
   12("Kreatin-Phosphokinase")
   13("Phosphofruktokinase 1")
   14("Pyruvat-Kinase - PK")
   15("Oxidoreduktasen")
   16("Dehydrogenase")
   17("Proteasen")
   18("Caspasen")
   19("Transferasen")
   20("Verdauungsenzyme")
   21("Glykosidasen")
   22("Lipasen")
   23("Proteinkinasen - Phosphotransferasen")
   24("Proteinkinase A")
   25("Polymerasen")
   26("DNA Polymerase")
   27("RNA-Polymerase")

   0 -.-> 1
   0 -.-> 2
   0 -.-> 3
   0 -.-> 4
   0 -.-> 5
   0 -.-> 6
   0 -.-> 7
   0 -.-> 8
   8 -.-> 9
   8 -.-> 10
   8 -.-> 11
   8 -.-> 12
   8 -.-> 13
   8 -.-> 14
   0 -.-> 15
   15 -.-> 16
   0 -.-> 17
   17 -.-> 18
   0 -.-> 19
   19 -.-> 8
   0 -.-> 20
   20 -.-> 21
   20 -.-> 22
   20 -.-> 6
   20 -.-> 17
   8 -.-> 23
   23 -.-> 24
   19 -.-> 25
   25 -.-> 26
   25 -.-> 27

   class 0 BC-active-node
   class 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 internal-link
Loading

@Friedolito
Copy link
Author

%%{init: {"flowchart": {"defaultRenderer": "dagre"}} }%%
graph LR
0("Enzymklasse")
1("Hydrolasen")
2("Isomerasen")
3("Ligase")
4("Lyasen")
5("Oxireduktasen")
6("Phosphatasen")
7("Telomerase")
8("Kinasen")
9("AMP-abhängige Kinase")
10("Glukokinase")
11("Hexokinase")
12("Kreatin-Phosphokinase")
13("Phosphofruktokinase 1")
14("Pyruvat-Kinase - PK")
15("Oxidoreduktasen")
16("Dehydrogenase")
17("Proteasen")
18("Caspasen")
19("Transferasen")
20("Verdauungsenzyme")
21("Glykosidasen")
22("Lipasen")
23("Proteinkinasen - Phosphotransferasen")
24("Proteinkinase A")
25("Polymerasen")
26("DNA Polymerase")
27("RNA-Polymerase")

0 -.-> 1
0 -.-> 2
0 -.-> 3
0 -.-> 4
0 -.-> 5
0 -.-> 6
0 -.-> 7
0 -.-> 8
8 -.-> 9
8 -.-> 10
8 -.-> 11
8 -.-> 12
8 -.-> 13
8 -.-> 14
0 -.-> 15
15 -.-> 16
0 -.-> 17
17 -.-> 18
0 -.-> 19
19 -.-> 8
0 -.-> 20
20 -.-> 21
20 -.-> 22
20 -.-> 6
20 -.-> 17
8 -.-> 23
23 -.-> 24
19 -.-> 25
25 -.-> 26
25 -.-> 27

class 0 BC-active-node
class 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27 internal-link

@SkepticMystic
Copy link
Owner

Great, thanks for all the info

@Friedolito
Copy link
Author

Thanks for taking a look at it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working view:codeblock:mermaid
Projects
Status: Todo
Development

No branches or pull requests

2 participants