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