ReactionDrawer

ReactionDrawer

new ReactionDrawer(options, moleculeOptions)

Source:

The constructor for the class ReactionDrawer.

Parameters:
Name Type Description
options Object

An object containing reaction drawing specitic options.

moleculeOptions Object

An object containing molecule drawing specific options.

Methods

draw(reaction, target, themeName, infoOnly)

Source:

Draws the parsed reaction smiles data to a canvas element.

Parameters:
Name Type Default Description
reaction Object

The reaction object returned by the reaction smiles parser.

target String | HTMLElement

The id of the HTML canvas element the structure is drawn to - or the element itself.

themeName String 'dark'

The name of the theme to use. Built-in themes are 'light' and 'dark'.

infoOnly Boolean false

Only output info on the molecule without drawing anything to the canvas.