NPellet / visualizer

Other
42 stars 24 forks source link

jsGraph and display spectrum #1021

Open lpatiny opened 7 years ago

lpatiny commented 7 years ago

In the view

https://my.cheminfo.org/?viewURL=https%3A%2F%2Fmydb.cheminfo.org%2Fdb%2Fvisualizer%2Fentry%2Fb60d4cd22af351b3996cb3321f169a0e%2Fview.json&v=v2.75.0

When you click on load example the spectrum is not displayed. However in version v2.74.1 it is. If I understood well it is the same version of jsGraph: 1.16.7 in both version.

The difference of commit is: https://github.com/NPellet/visualizer/compare/v2.74.1...v2.75.0

This bug only appears when the option 'optimize with slot' is present

I add a link to jsgraph bug report because I don't know why this bug suddenly appeared while it seems that the version of jsgraph didn't change between the 2 releases.

https://github.com/NPellet/jsGraph/issues/120#issuecomment-271420978

NPellet commented 7 years ago

We have to check because I was working on that in the jsGraph 2.0 branch. I hope my changes didn't leak into the 1.6.x branch. I'm not exactly a git expert :D

targos commented 7 years ago

f14c9fb1ef662e184dc09a96d82e6fc1cf270d82 is the first bad commit commit f14c9fb1ef662e184dc09a96d82e6fc1cf270d82 Author: Michaël Zasso targos@protonmail.com Date: Fri Dec 16 11:11:21 2016 +0100

fix(core): don't load jsgraph and d3 unless it's necessary

:040000 040000 4eaa526aec26e8e77034ad6788ceee6210eb9458 67f93af727ea3e50caa1603dd2464de0b242a717 M src

targos commented 7 years ago

I don't understand how this can affect the spectra displayer...

NPellet commented 7 years ago

The slot calculation is in a worker. Can there be a link with async awaits ?

targos commented 7 years ago

Can there be a link with async awaits ?

No. I just discovered that if I force jsgraph to be loaded during the initialization of the visualizer, it works.

NPellet commented 7 years ago

Ok then the problem is partly mine, because that should work.