You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8" /><metaname="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"><title>PDBe Molstar - Basic</title><!-- Molstar CSS & JS --><linkrel="stylesheet" type="text/css" href="https://www.ebi.ac.uk/pdbe/pdb-component-library/css/pdbe-molstar-3.1.2.css"><scripttype="text/javascript" src="https://www.ebi.ac.uk/pdbe/pdb-component-library/js/pdbe-molstar-plugin-3.1.3.js"></script><style>#myViewer{
float:left;
width:500px;
height:500px;
position:relative;
}
</style></head><body><h4>PDBe Mol* JS Plugin Demo</h4><!-- Molstar container --><divid="myViewer"></div><script>varselectSections=[{struct_asym_id: 'B',start_residue_number: 8,end_residue_number: 10,color:{r:255,g:0,b:255},sideChain: true},{struct_asym_id: 'B',start_residue_number: 2,end_residue_number: 5,color:{r:255,g:0,b:0}}]//Create plugin instancevarviewerInstance=newPDBeMolstarPlugin();//Set options (Checkout available options list in the documentation)varoptions={moleculeId: '2nnu',hideControls: true,// comment / uncomment to trigger bughideStructure: ['water'],}//Get element from HTML/Template to place the viewer varviewerContainer=document.getElementById('myViewer');//Call render method to display the 3D viewviewerInstance.render(viewerContainer,options);//Trigger color and spin upon load completeviewerInstance.events.loadComplete.subscribe(()=>{viewerInstance.visual.toggleSpin(true);viewerInstance.visual.select({data: selectSections,nonSelectedColor: {r:255,g:255,b:255}})});</script></body></html>
The text was updated successfully, but these errors were encountered:
Hi, this issue seems to be fixed in version 3.3.0.
Both hideStructure: ['water'] initial option and calling viewerInstance.visual.visibility({ water: false }); should work.
I'm setting
hideStructure: ['water'],
of the initial options and then usingloadComplete.subscribe
to set colors.This gives me an error
Uncaught (in promise) Error: Could not find node 'undefined'.
Perhaps its trying to color the water which isnt there?
code example on plnkr: https://plnkr.co/edit/V0wwfwfsGVplURYD
The text was updated successfully, but these errors were encountered: