-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined in v3.1.2 #94
Comments
Hi, I'm thinking this issue could be caused by calling the I expect your javascript code looks something like this: const viewerContainer = document.getElementById('myViewer')!;
const viewerInstance = new PDBeMolstarPlugin();
viewerInstance.render(viewerContainer, initOptions);
viewerInstance.visual.update(newOptions, false); Try to change it to something more like this: const viewerContainer = document.getElementById('myViewer')!;
const viewerInstance = new PDBeMolstarPlugin();
viewerInstance.render(viewerContainer, initOptions).then(() => viewerInstance.visual.update(newOptions, false)); Also, updating to version 3.1.3 could help. |
Or alternatively const viewerContainer = document.getElementById('myViewer')!;
const viewerInstance = new PDBeMolstarPlugin();
viewerInstance.render(viewerContainer, initOptions);
viewerInstance.events.loadComplete.subscribe(() => viewerInstance.visual.update(newOptions, false)); |
Hi, viewerInstance.render(viewerContainer, initOptions); Both structures got loaded but then the coloring was weird. The colors of the chains we jumping and changing by themselves :) I guess i would have to change my coloring functions as well in order to make them work with the new version of the plugin. Too much work to do tho haha. So for now i will stick with v1.2.1 of the plugin as everything works well with it. Thank you again for your time and help! |
Oh, sorry. Loading the second structure actually triggers the Fortunately, there is an easy fix for this. Just unsubscribe as soon as the event fires for the first time:
|
Hi,
i have the following error in v3.1.2: this.plugin is undefined, in function update. I use it to load a second structure(chain). This problem is not existing in v1.2.1 however. I can load 2 structures through the update function.
I checked for similar issues before posting this one and found one. According to that thread it looked like it was solved:
"Mol* core dependency update to v3.8.2 is now available without the above mentioned issue"
Not sure what it means tho :) So i installed nodejs 18.17.0 and build the latest version of the plugin with the hope the error to be gone. But no such luck :)
Any ideas or hints on how to solve the issue will be appreciated!
Thank you for time and help in advance!
Cheers
Dimitar
The text was updated successfully, but these errors were encountered: