NeptuneLabs FSI Viewer JS User Manual page 72

Table of Contents

Advertisement

Example:
var node = document.createElement("fsi-viewer");
node.style.width = "600px";
node.style.height = "400px";
var parameters =
{"imagesrc" : "images/Rocker Shoe.tif", "skin":"silver",
"debug":true};
$FSI.setParameters(node, parameters);
document.body.appendChild(node);
// Important: call this AFTER adding the node to the DOM
$FSI.initCustomNode(node);
Note:
$FSI.initCustomNode(node) initializes the given node.
When adding multiple viewers you can initialize all new FSI Viewer JS nodes in one
go, using this command:
$FSI.initCustomTag("fsi-viewer");
or, when using different custom tags (fsi-viewer, fsi-imageflow,...):
$FSI.initCustomTags(); to initialize all new FSI custom tags.
Destroying Instances
Before finally removing <fsi- viewer> nodes from the DOM, you need to call the
destroy() method of the node.
This will release all event handlers and free allocated resources.
Example:
var node = document.getElementById("myViewer");
node.destroy();
node.parentNode.removeChild(node);
NeptuneLabs - FSI Viewer
2 FSI Viewer JS
72

Advertisement

Table of Contents
loading

Table of Contents