jsme-editor / jsme-editor.github.io

73 stars 19 forks source link

Only showing one molecule (with error in console) when multiple molecules called #24

Closed ggieling closed 1 year ago

ggieling commented 2 years ago

I have a page that should display multiple molecules in one page. Problem is, it shows only one and produces an error in the console. the error is: `

Uncaught TypeError: b is null MT 0.js:654 BT 0.js:617 JSME 0.js:639 N 0.js:912 jsmeOnLoad http://ipdev/bioref/aa.php?aasort=aa1:43 wD 0.js:653 qD 0.js:330 N 0.js:912 gwtOnLoad 0.js:913

0.js:929 m http://ipdev/includes_2018/jsme/jsme/jsme.nocache.js:10 onScriptDownloaded http://ipdev/includes_2018/jsme/jsme/jsme.nocache.js:11 d http://ipdev/includes_2018/jsme/jsme/jsme.nocache.js:7 e http://ipdev/includes_2018/jsme/jsme/jsme.nocache.js:8 ` I cannot see if this is related to me making an error in the code calling the JSME module, or an error in the code itself that pops up when showing multiple molecules in one page. It could be that it is a call in the code that in previous browser versions only invoked a warning, but nowadays invokes an error. Perhaps important to know, If I use similar code in a page that shows only one molecule, I do not see the error message. So apparently there is something going wrong when calling the code repeatedly for multiple molecules. As an example I have included the page that produces the error [example.zip](https://github.com/jsme-editor/jsme-editor.github.io/files/8325069/example.zip)
ggieling commented 2 years ago

I just found that the problem exists only if I include the option noShowdragandDropIconindepictmode. After removing this option the molecules are shown as expected, but unfortunately, with the drag and drop icon.

jsme-editor commented 2 years ago

Bug confirmed and fixed in the source code. Thank you for the report.