Skip to content

3. Helper Methods

Mandar Deshpande edited this page Mar 10, 2020 · 1 revision

Helper Methods

Helper functions are useful to programatically control the visualization.

Check the links below for working examples demonstrating the use of helper function -

Available functions

No. Function Parameters Description
1 highlight `startResidue:number, endResidue:number, color?:{r:number, g:number, b:number} string`
2 clearHighlight - Clear highlight
Example:Instance.clearHighlight()
3 updateTheme params
Type: json
{start:number, end:number, color?: string}[]
Color residues
Example:Instance.updateTheme([{start:1, end:6, color: "#ff0000"}])
Above code will color residues 1 to 5 in red
color param is optional and can be represented as rgb string or hex code or css supported color name. Ex. - rgb(250,0,0) or #ff0000 or red for red.
4 resetTheme - Reset theme
Example:Instance.resetTheme()
Clone this wiki locally