Include the JS9 files, add an empty <div>, and call
JS9.create() with the container's id. No hand-placed menubar/
toolbar/display divs, and no required configuration — override a default
only if you want to.
JS9.create("viewer", {
image: "../data/example.fits.gz",
opts: { scale: "log", colormap: "viridis" }
});
JS9.create("viewer2", {
layout: "minimal",
image: "../data/example.fits.gz",
opts: { colormap: "heat" }
});
<div class="JS9Editor"
data-layout="viewer"
data-image="../data/example.fits.gz"
data-colormap="cool"></div>
Layout presets: full, viewer, minimal.
Compose parts on top of a preset, e.g.
JS9.create("viewer", {layout: "minimal", menubar: true, panner: true}),
or define your own named looks by adding to JS9.Layouts.