MarvinJSUtils.getEditor(...) promise not always resolved

User 00d8fa0569

22-07-2015 13:39:35

Hi,


I am seeing that occasionally the promise returned from the MarvinJSUtils.getEditor(...) function call does not always get resolved, meaning that I cannot get access to the sketcher instance. I have to refresh the browser to resolve the issue. The editor loads in the UI and I am able to use the editing features, but programmatically I cannot import/export because I cannot obtain the sketcher instance.


    MarvinJSUtil.getEditor("#sketch").then(function (sketcherInstance) {
sketcherInstance.clear();

sketcherInstance.setDisplaySettings(displaySettings);

sketcherInstance.importStructure("mrv", mrv);

}, function (error) {
console.log(error);
});


The version of MarvinJS I am using is 15.3.9. I would love to provide a test-case that works 100% of the time, but unfortunately I cannot.


I'm wondering whether anyone has seen this before? Is it possible that in some scenarios the Promise is not being rejected/resolved upon an error internal to MarvinJS?


Thanks,


Nathan

ChemAxon 76c88f5366

28-07-2015 11:28:30

Hi Nathan,


This issue is fixed in version 15.5.4. I recommend you to use this or a newer version of Marvin JS.


If you require further information, let us know.


Best Regards,
Eszter


 

User 00d8fa0569

28-07-2015 12:19:58

Hi Eszter,


Thanks for the information - I will upgrade to the latest version.


Regards,


Nathan