Skip to main content

Initializing FSI QuickZoom manually

If you are adding images by script, you can decide to:

Automatic Initialization

Let FSI.QuickZoom initialize automatically and add images manually:

Example:
<script type="text/javascript" src="//yourdomain.com/fsi/viewer/applications/quickzoom/js/fsiquickzoom.js">
</script>

<script type="text/javascript">
// add your images here
addMyImagesToTheDom();

// make FSI.QuickZoom look for new images
$FSI.quickZoom.scanForNewImages();
</script>

Manual Initialization

Initialize FSI.QuickZoom manually after adding your images:

Example:
<script type="text/javascript" src="//yourdomain.com/fsi/viewer/applications/quickzoom/js/fsiquickzoom.js">
</script>

<script type="text/javascript">
// prevent $FSI.QuickZoom from initializing automatically
// on document load
$FSI.quickZoomParameters = {autoInit:false};
function onBodyLoaded() {
addMyImagesToTheDom(); // add your images here

// create and initialize FSI.QuickZoom
var parameters = {debug:true, useDevicePixelRatio:true};

myQuickZoom = new $FSI.QuickZoom();
myQuickZoom.init(parameters);
}
</script>