Skip to content

cheminfo/react-visualizer

Repository files navigation

react-visualizer

Visualizer in a react component. Visualizer index page generator.

makeVisualizerPage

Generate an HTML page which serves the Visualizer, as a Node.js API or as a CLI command.

CLI example:

npx react-visualizer makeVisualizerPage --help

Dev example:

node bin/makeVisualizerPage.js --config=config.example.json

Node.js API: see options of makeVisualizerPage function.

Visualizer

Component which instantiates a visualizer iframe. Pass it a URL generated by makeVisualizerPage.

See component props for more information.

OldVisualizer

The legacy visualizer component works by creating the visualizer page dynamically with a blob URL.

It is not recommended to use it anymore.

Properties

  • cdn - URL of the CDN that will serve the Visualizer. Default: https://www.lactame.com/visualizer
  • fallbackVersion - Visualizer fallback version used if no valid version is found. Default: 'latest'.
  • scripts - Array of scripts to load in the iframe before the Visualizer
  • viewURL
  • dataURL
  • config - URL to the config or object
  • version - version to load or auto to select it automatically based on the view. Default: latest
  • style - style object to apply to the iframe. Default: {width: '100%', height: '100%', position: 'absolute', border: 'none'}

About

The visualizer in a react component

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors