Comments (3)
Hi,
I'm thinking this issue could be caused by calling the update
function before the plugin is fully initialized (i.e. before the asynchronous render
function has completed).
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.
from pdbe-molstar.
Or alternatively
const viewerContainer = document.getElementById('myViewer')!;
const viewerInstance = new PDBeMolstarPlugin();
viewerInstance.render(viewerContainer, initOptions);
viewerInstance.events.loadComplete.subscribe(() => viewerInstance.visual.update(newOptions, false));
from pdbe-molstar.
Hi,
thank you very much for your reply. I tried both solutions which you provided including using v3.1.3. The following kinda worked:
viewerInstance.render(viewerContainer, initOptions);
viewerInstance.events.loadComplete.subscribe(() => viewerInstance.visual.update(newOptions, false));
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!
from pdbe-molstar.
Related Issues (20)
- How To color by secondary structure HOT 2
- setting initial options hide water with select on load HOT 2
- selectInteraction option doesn't seem to work HOT 3
- import PDBeMolstarPlugin ? HOT 2
- Drag and Drop of the second PDB file fails on existing PDB render HOT 1
- Plane/disc implementation HOT 1
- Remove molecule HOT 1
- Enable the visualization of more molecules simultaneously HOT 3
- Get selection programatically HOT 1
- Passing data directly without loading from URLs HOT 8
- new window.PDBeMolstarPlugin more than once reported an error HOT 2
- Setting fog off and orthoscopic view on by default HOT 4
- How to deploy both PDBeMolstarPlugin and external component for Molstar? Advice needed...
- Colouring each residue HOT 2
- How can I obtain detailed information such as the number of chains, the number of residues, and the names of each residue in the protein? HOT 1
- Loading custom pdb HOT 2
- upload a local pdb file to view HOT 3
- wiki update versions in examples from 3.1.0 to 3.1.3 HOT 1
- Can v3.1.3 being published to npm registry? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdbe-molstar.