Plugin Parameters


plugins

Description adds a Plug-in (e.g. Fullscreen) to the viewer
Syntax String
Default ""
Context FSI Viewer

Adds a plug-in to the viewer.

Please note:

If you would like to add specific parameters to the plugins via the fsi-viewer tag, you can do this by prefixing the parameter name with the name of the plug-in, e.g. autospin_enabled="true"



FullScreen Plug-In

Adding the parameter plugins:"FullScreen, Resize" enables a full screen view option in FSI Viewer. The Resize parameter needs to be set in order to ensure proper adjusting to the full screen.

Note:

If the FSI Viewer is embedded in an iFrame, the attribute allowfullscreen="true" needs to be added to the iFrame. Otherwise the FullScreen Plug-in will not work due to security restrictions of the browser.


AutoSpin Plug-In

available from version 16.09.30

Adding the parameter plugins:"AutoSpin" enables a button which lets you play/pause the animation that is set with the autospinspeed parameter. Parameters are listed as the following in the fsi-viewer tag: autoSpin_Speed, mouseModes_MenuOffset, etc.


The following parameters can be set:

Speed

Description Time in seconds for a full rotation
Syntax float
Default -
Context FSI Viewer

Has the same function as "autoSpinSpeed", but is used here in the context of the plug-in. Time in seconds for a full rotation. Negative values reverse spin direction.


Interval

Description Time in seconds for a full rotation
Syntax float
Default -
Context FSI Viewer

Has the same function as "autoSpinInterval", but is used here in the context of the plug-in.

Can be used instead of autoSpinSpeed to define the duration of the AutoSpin. autoSpinInterval defines the pause between every step of the rotation in ms. Negative values reverse spin direction. The hierarchy of the parameters is as follows:

  • autoSpin_interval (Plugin Parameter)
  • autoSpinInterval (Config Parameter)
  • autoSpin_speed (Plugin Parameter)
  • autoSpinSpeed (Config Parameter)



preventClickZoomWhileSpinning

Description prevents zooming while Autospin is activated
Syntax Boolean
Default false
Context FSI Viewer

Prevents zooming while clicking into the Autospin.


Button

Description enables Play/Pause button
Syntax Boolean
Default true
Context FSI Viewer

Enables the Play/ Pause button for the autospin animation



MouseModes Plug-In

The MouseMode plugin is activated by default with the _default.xml.


The following parameters can be set:

MenuOffset

Description Indentation of the menu buttons
Syntax Integer
Default 0
Context FSI Viewer

Specifies the space in pixels left of the menu button(s) of the plug-in.


Mode n

Description Removes the button for mouse mode n from the menu bar
Syntax Boolean
Default -
Context FSI Viewer

 Provides the possibility to hide specific mouse mode buttons.



Mode n Mouse Mode

Mode0

Zoom

Mode1

Pan


Mode2

Rotate 3D (X/Y Axis)


Mode3

Rotate 2D (Z Axis)


Sequence

Description Sequence of the buttons
Syntax String
Default 0,1,3,2
Context FSI Viewer

You can alter the sequence of the buttons by providing the modes separated by commas (see the table above).

Example: "1,0,2,3" alters the sequence of the buttons to "Pan, Zoom, Rotate 3D, Rotate 2D".


Measure Plug-In


available from version 18.06.25


Adding the parameter plugins="Measure" provides an additional button/ mouse-mode which enables the user to measure distances and angles inside the viewer by clicking & dragging. You can list the parameter for the plug-in in the config XML, adressing it with


Example:
<plugin src="measure" ImageWidth="2.65" Suffix=" mm" />


or you can list the parameters as the following in the fsi-viewer tag: measure_ImageWidthmeasure_Suffix, etc.

(Provided the parameter plugins="Measure" is set in the fsi-viewer tag as well)


Pressing SHIFT locks the angle to 45 degree steps. Pressing CTRL moves the measurement line.


Mouse Mode

The mouse mode id for the measuring mode is 100. You can use this id to set the InitialMouseMode parameter of the FSI Viewer. e.g. 

<InitialMouseMode value="100" />

The Measure Plug-in requires the real width of the entire image to enable distance measuring.


Example 1:

If you already know the entire width of the image, simply add the "ImageWidth" and the "Suffix" parameter: If the width of the entire image is 120.5 inches the corresponding tag looks as follows:


Example (defined in Config XML):
<plugin src="measure" ImageWidth="120.5" Suffix=" inches" />

Please note:

You can also define the plugin parameters directly in the fsi-viewer tag, which could look like this:


<fsi-viewer width="100%" height="100%" src="images/sample.jpg" 
skin="white" plugins="Measure" measure_ImageWidth="120.5" measure_Suffix=" inches">


Example 2:

If you know the width of a part of the image, but you do not know the width of the entire image, you should follow the steps below:

  1. Add the measure plug-in without any parameters.
  2. Open the image inside the FSI Viewer and choose the "Measure" mouse mode.
  3. Measure the part of the image you know the real width of. In our example below, we know the width of the notebook is 480mm. The measure plugin will display a value that is our value n.
  4. Calculate value w for the ImageWidth parameter: 


    • w = real length / n *100.
    • The Measure plug-in displays n=57.6
    • The real length L of the notebook front is 480 mm.
    • ImageWidth w = L / *100= 480 / 57.6 = 8.33 *100= 833


So the plug-in tag would be defined like this:


Example (defined in Config XML):
<plugin src="measure" ImageWidth="833" Suffix=" mm" />

Please note:

You can also define the plugin parameters directly in the fsi-viewer tag, which could look like this:


<fsi-viewer width="100%" height="100%" src="images/sample.jpg" skin="white" 
plugins="Measure" measure_ImageWidth="833" measure_Suffix=" mm">

The plug-in does not support any perspective correction. This means that measuring scanned maps, diagrams will be accurate, measuring 3 dimensional objects is less accurate.


Measure Parameters

The following attributes can be assigned to the tag. You might as well define all plug-in parameters inside the <fsi-viewer> tag by using the prefix "measure_" with the parameter name, e.g. "measure_ ImageWidth".


ImageWidth

Description Real width of the entire image
Syntax Float
Default 100.0
Context FSI Viewer

Defines the real width of the entire image (e.g. 120 inches). Please see the explanation in the previous section.


Prefix

Description Defines a prefix for the length value
Syntax String
Default ---
Context FSI Viewer

Defines the prefix for the length value e.g. "length: ".


Suffix

Description Defines a suffix for the length value
Syntax String
Default mm
Context FSI Viewer

Defines the suffix for the length value e.g. "inches". Usually this is a length unit.



Initial

Description Defines the coordinates of a measure section that is shown initially
Syntax String
Default
Context FSI Viewer

Defines the coordinates of a measure section that is shown initiallyComma seperated string containing x1,y1,x2,y1 [0..1] coordinates of the image. The values can easily be retrieved using the "arCoords" arguments of the "onMeasureEnd" listener.



ShowInAllMouseModes

Description Shows the measurement in all mouse modes
Syntax Boolean
Default false
Context FSI Viewer

Show the measurement in all mouse modes, not just in mouse mode "measure" (100).



Decimals

Description Number of decimals of the length value
Syntax Number
Default 1
Context FSI Viewer

Defines the number of decimals of the length value.


ShowText

Description Display the current measurement string
Syntax Boolean
Default true
Context FSI Viewer

Hides the text displaying the current measurement if set to "false".


ShowAngle

Description Display current angle
Syntax Boolean
Default true
Context FSI Viewer

If set to true the plug-in appends a text representing the current angle in degrees to the text display. E.g. "120.2 inches, 43.2°".


LineColor

Description Defines the color of the measure lines
Syntax HexColor
Default FF0000
Context FSI Viewer

6-digit hexadecimal color value defining the color of the measure lines.


TextColor

Description Defines the color of the text
Syntax HexColor
Default 000000
Context FSI Viewer

6-digit hexadecimal color value defining the color of the text.


TextBorder

Description Defines the color of the text border
Syntax HexColor or "false"
Default 000000
Context Plug-in attribute
Version FSI Viewer

6-digit hexadecimal color value defining the color of the text border. Use "false" for no border.


TextSize

Description Size of the text
Syntax Number (pixel)
Default 12
Context FSI Viewer

Text size for the textual output in pixels.


BGColor

Description Defines the color of the text background
Syntax HexColor
Default FFFFFF
Context FSI Viewer

6-digit hexadecimal color value defining the background color of the text.