Fix bioEddie initialization [SCI-6196] (#3624)

Co-authored-by: Anton <anton@scinote.net>
This commit is contained in:
aignatov-bio 2021-11-02 10:26:01 +01:00 committed by GitHub
parent a99599efea
commit 6dea5f17ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,11 +89,13 @@ var bioEddieEditor = (function() {
$(document).on('turbolinks:load', function() {
bioEddieIframe = document.getElementById('bioEddieIframe');
bioEddieModal = $('#bioEddieModal');
bioEddieIframe.onload = function() {
BIO_EDDIE = bioEddieIframe.contentWindow.bioEddieEditor;
CHEMAXON = bioEddieIframe.contentWindow.chemaxon;
importMolecule();
};
if (bioEddieIframe) {
bioEddieIframe.onload = function() {
BIO_EDDIE = bioEddieIframe.contentWindow.bioEddieEditor;
CHEMAXON = bioEddieIframe.contentWindow.chemaxon;
importMolecule();
};
}
bioEddieModal.on('shown.bs.modal', function() {
initIframe();