Closed data2code closed 1 year ago
Attached are two example files, the difference between good.html and bad.html is there is "model":0 added to bad.html. visual.zip
setStyle takes a selection object and a style object. You are providing three objects. You need to merge the model and chain specifiers into one object:
viewer_16811107181320505.setStyle({"model": 0,"chain": "B"},{"cartoon": {"color": "#00ffff"}});
Thank you so much, extremely helpful!!!
Is your feature request related to a problem? Please describe. I plan to display multiple models within one view, so I try to specify styles for each model separately.
If I do not specify which model, the following line colors the object by chains and the protein is displayed: viewer_16811107181320505.setStyle({"chain": "B"},{"cartoon": {"color": "#00ffff"}});
However, once I explicitly specify the model as the following, nothing is displayed: viewer_16811107181320505.setStyle({"model": 0},{"chain": "B"},{"cartoon": {"color": "#00ffff"}});
Describe the solution you'd like My aim is to load two models and specify different colors for each chain of each model separately. What did I do wrong in the above example? Thank you!