Biojs.MmcifViewer showcase
PLEASE NOTE: the above example is being affected by the CSS rules of this site. Click on 'view in window' to see the component by using its own CSS stylesheet(s) only.
View in windowOverview
This is the description of the MmcifViewer component. This component shows tabular views of information in PDB's mmcif files.
Version
1.0.0.
To get the above Biojs.MmcifViewer to work on your page, you need to do the following:
- Include the file Biojs.MmcifViewer.js and its dependencies to your page header.
Biojs scripts
<script language="JavaScript" type="text/javascript" src="src/Biojs.js">
- Create a div tag which holds an unique identifier.
<body> ... <div id="YourOwnDivId" /> ... </body> - Create a code snippet within a <script> tag and instance Biojs.MmcifViewer into.
window.onload = function() { var myview = new Biojs.MmcifViewer({ divid:"YourOwnDivId", pdbid:"1cbs" }); };
Required Parameters
Optional Parameters
showAcategory
Parameters:
-
catname
showCategoriesList
Parameters:
-
catlist
showCategoryTable
Parameters:
-
catinfo
standardizeVals
Parameters:
-
vals
onClick
Parameters:
-
{function} actionPerformed
A function which receives an Biojs.Event object as argument.
Returned data in the Biojs.Event object:
-
{Object}
source
The component which did triggered the event. -
{string}
type
The name of the event. -
{int}
selected
Selected character.
Example :
instance.onClick(
function( objEvent ) {
alert("The character " + objEvent.selected + " was clicked.");
}
);
onHelloSelected
Parameters:
-
{function} actionPerformed
A function which receives an Biojs.Event object as argument.
Returned data in the Biojs.Event object:
-
{Object}
source
The component which did triggered the event. -
{string}
type
The name of the event. -
{int}
textSelected
Selected text, will be 'Hello' obviously.
Example :
instance.onHelloSelected(
function( objEvent ) {
alert("The word " + objEvent.textSelected + " was selected.");
}
);

