Collections:
3Dmol.js Bug - data-ui=true Impacts on Selection
Why is the default style done after removing data-ui="true" in the embedded 3Dmol viewer?
✍: FYIcenter.com
There seems to be code bug in the 3Dmol.js library. Here is an HTML code example, Embedded-Viewer-data-ui-Bug.html, that contains 2 embedded viewers: one with data-ui="true" and the other without data-ui="true":
<html> <body> <p>Without data-ui=true</p> <div style="width: 400px; height: 400px; position: relative;" class="viewer_3Dmoljs" data-pdb="1YCR" data-select1='chain:A' data-style1='cartoon:color=spectrum' data-select2='chain:B' data-style2='stick' ></div> <p>With data-ui=true</p> <div style="width: 400px; height: 400px; position: relative;" class="viewer_3Dmoljs" data-pdb="1YCR" data-select1='chain:A' data-style1='cartoon:color=spectrum' data-select2='chain:B' data-style2='stick' data-ui="true" ></div> <script src="/3Dmol-min.js"></script> </body></html>
This example HTML code will displays the same protein in two DIV elements:
As you can see, when UI components are turned on, the default style of "line" is applied to the default selection of "all".
⇒ Load Data by URL into Embedded 3Dmol Viewer
⇐ Multiple Selections with Embedded 3Dmol Viewer
⇑⇑ 3Dmol.js FAQ
2023-02-03, 402🔥, 0💬
Popular Posts:
How to build my own JSME editor Web Page? If you want to build your Web page and offer JSME as a mol...
What is Isomer? An Isomer is molecule that has the same the same chemical formula as another molecul...
Molecule Summary: ID: FYI-1001896 SMILES: O=C(O)C(OC(=O)C(NC(=O)C( NC(=O)C(NC(=O)C(NC(=O)CN C(=O)C(NC(...
Molecule Summary: ID: FYI-1000276 SMILES: CC[C@H](C)O Received at FYIcenter.com on: 2021-03-02
Molecule Summary: ID: FYI-1000197 SMILES: CC(C)C1=CC=CC=C1.[CH-]1C =CC=C1.F[Sb-](F)(F)(F)(F )F.[Fe+2]...