User:Jaime Prilusky/Test/JSmolExtensionExamples: Difference between revisions
From Proteopedia
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
<StructureSection load='3rec' size='340' side='right' caption='Caption for this structure' scene=''> | <StructureSection load='3rec' size='340' side='right' caption='Caption for this structure' scene=''> | ||
The code below will create a green link (Proteopedia's links that interact with applets are green) with the text 'Turn on labels' that will execute the script inside <script> and </script> | |||
<pre> | |||
<jmol> | <jmol> | ||
<jmolLink> | <jmolLink> | ||
| Line 8: | Line 10: | ||
</jmolLink> | </jmolLink> | ||
</jmol> | </jmol> | ||
</pre> | |||
<jmol> | |||
<jmolLink> | |||
<script> select all; labels on; </script> | |||
<text>Turn on labels</text> | |||
</jmolLink> | |||
</jmol> | |||
Replacing 'jmolLink' by 'jmolButton' will draw a button. | |||
<pre> | |||
<jmol> | |||
<jmolButton> | |||
<script> select all; labels off; </script> | |||
<text>Turn off labels</text> | |||
</jmolButton> | |||
</jmol> | |||
</pre> | |||
<jmol> | <jmol> | ||
| Line 15: | Line 36: | ||
</jmolButton> | </jmolButton> | ||
</jmol> | </jmol> | ||
</StructureSection> | </StructureSection> | ||
== References == | == References == | ||
<references/> | <references/> | ||