Skip to main content

How to add parameters

Parameters are added to the <fsi-thumbbar> tag. Note that you can as well use FSI Viewer configuration files (required e.g. when using hot spots):

Adding Parameters to the viewer

Example:
<body>

//Adding parameters directly to the tag:
<fsi-thumbbar width="100%" height="150" src="/images/foo/" backgroundcolor="#000" presentationtype="flat">
</fsi-thumbbar>

//Example with using a FSI configuration file:
<fsi-thumbbar width="100%" height="150" dir="/images/foo/" cfg="sample/sample_configuration>
</fsi-thumbbar>

</body>

Simple Configuration File

You can also define individual configuration .xml files like this:

<fsi_parameter>
<image>
<path value="samples/Watch.jpg" />
</image>
<ThumbBar>
<presentationtype value="stacks" />
<debug value="1" />
<enablezoom value="false" />
<preloadcount value="8" />
</ThumbBar>
</fsi_parameter>

Defining Global Parameters

If you would like to use global parameters for all FSI ThumbBar instances, the corresponding parameters can be defined in the _default.xml.

Example _default.xml:
<fsi_parameter>
<Image>
<ServerType value="FSI"/>
</Image>

<ThumbBar>
<presentationtype value="stacks" />
<debug value="1" />
<enablezoom value="false" />
<preloadcount value="8" />
</ThumbBar>

<Options>
<FSIBase value="config/"/>
<Language value="english"/>
<ScenePreload value="true"/>
</Options>
</fsi_parameter>

Passing Parameters to the script

You can optionally modify the way FSI ThumbBar works by passing parameters to the script. To do so, pass an object containing the parameters and value as an object to the constructor:

Example:
<script type="text/javascript">
thumb = new $FSI.ThumbBar({debug:true, backgroundColor:"#ff0"});
thumb.init();
</script>