2 FSI Viewer JS
73
NeptuneLabs - FSI Viewer
2.8 JavaScript Interface
The JavaScript interface of FSI Viewer JS can be useful if you want to change the
current image or config or add additional content depending on the object spin
position or hot spot actions.
2.8.1 Public Methods
void
changeConfig(strCfgFileName, oParameters);
Reset the viewer object and change the configuration to the
given configuration file.
strCfgFileName
(optional): path to the configuration file
(see "cfg" parameter)
oParameters
(optional): an object containing parameters If
present, these parameters will overwrite the parameters
defined upon initialization.
Example:
var oParameters = {};
oParameters src = "images/bluemarble.tif";
/*
// optional:
oParameters.imageWidth;
oParameters.imageHeight;
oParameters.cropRect;
oParameters.cropValues;
oParameters.effects;
*/
fsiviewer.changeConfig(oParameters);
bSuccess
changeImage(cfg, strView);
Resets the viewer object and changes the image displayed
to the given image file.