mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 00:24:42 +08:00
Fix loading of MarvinJS object (when MarvinJS is disabled) [SCI-10260]
This commit is contained in:
parent
425b189742
commit
d4f35f51bd
1 changed files with 7 additions and 4 deletions
|
@ -320,13 +320,16 @@ $(document).on('click', '.gene-sequence-edit-button', function() {
|
|||
});
|
||||
|
||||
function initMarvinJs() {
|
||||
if (typeof (ChemicalizeMarvinJs) === 'undefined') {
|
||||
setTimeout(initMarvinJs, 100);
|
||||
return;
|
||||
if (!window.MarvinJsEditor) {
|
||||
MarvinJsEditor = MarvinJsEditorApi();
|
||||
}
|
||||
|
||||
MarvinJsEditor = MarvinJsEditorApi();
|
||||
if (MarvinJsEditor.enabled()) {
|
||||
if (typeof (ChemicalizeMarvinJs) === 'undefined') {
|
||||
setTimeout(initMarvinJs, 100);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($('#marvinjs-editor')[0].dataset.marvinjsMode === 'remote') {
|
||||
ChemicalizeMarvinJs.createEditor('#marvinjs-sketch').then(function(marvin) {
|
||||
marvin.setDisplaySettings({ toolbars: 'reporting' });
|
||||
|
|
Loading…
Add table
Reference in a new issue