Skip to main content

Plugin Parameters

plugins

string

adds a Plug-in (e.g. Fullscreen) to the viewer
since 16.09

Adds a plug-in to the viewer.

tip

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.

Resize Plug-In

By adding the parameter plugins:"Resize" the plug-in rearranges the user interface according to the size of the object tag without reloading the entire viewer instance and without the need for client side scripting.

MaxZoom Plug-In

available from version 18.06

By adding the parameter plugins:"maxZoom" expands the user interface by a button to quickly zoom to the physical resolution of the source image.

ZoomMeter Plug-In

available from version 18.06

Adding the parameter plugins:"ZoomMeter" extends the navigator window with a display of the current magnification. The following parameters can be set:

zoomMeter

boolean

Enable or disable the text in the navigation window
since 18.06

true
Default

Enables or disable the text in the navigation window.

zoomMeter_color

rgb hex

Defines the color of the text in the navigation window
since 18.06

Defines the color of the text in the navigation window.

zoomMeter_decimals

integer

Number of decimals displayed in the navigation window
since 18.06

2
Default

Defines the color of the text in the navigation window.

zoomMeter_srcRelative

boolean

Decides how the percentage is displayed
since 18.06

true
Default

Display percentage relative to the source image dimension (true) or relative to the initial image (false).

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

float

Time in seconds for a full rotation
since 16.09

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

float

Time in seconds for a full rotation
since 16.09

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

boolean

prevents zooming while Autospin is activated
since 16.09

false
Default

Prevents zooming while clicking into the Autospin.

Button

boolean

enables Play/Pause button
since 16.09

true
Default

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:

integer

Indentation of the menu buttonst
since 16.09

0
Default

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

Mode n

boolean

Removes the button for mouse mode n from the menu bar
since 16.09

Provides the possibility to hide specific mouse mode buttons.

Mode nMouse Mode
Mode0
Zoom
Mode1
Pan
Mode2
Rotate 3D (X/Y Axis)

Sequence

string

Sequence of the buttons
since 16.09

0,1,3,2
Default

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, addressing it with

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

or you can list the parameters as the following in the <fsi-viewer> tag: measure_ImageWidth, measure_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.

Measuring 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:
Value w calculationOutcome
- 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
Measure

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

float

Real width of the entire image
since 18.06

100.0
Default

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

Prefix

string

Defines a prefix for the length value
since 18.06

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

Suffix

string

Defines a suffix for the length value
since 18.06

mm
Default

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

Initial

string

Defines the coordinates of a measure section that is shown initially
since 18.06

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

ShowInAllMouseModes

boolean

Shows the measurement in all mouse modes
since 18.06

false
Default

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

Decimals

number

Number of decimals of the length value
since 18.06

1
Default

Defines the number of decimals of the length value.

ShowText

boolean

Display the current measurement string
since 18.06

true
Default

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

ShowAngle

boolean

Display current angle
since 18.06

true
Default

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

rgb hex

Defines the color of the measure lines
since 18.06

FF0000
Default

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

TextColor

rgb hex

Defines the color of the text
since 18.06

000000
Default

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

TextBorder

rgb hex or false

Defines the color of the text border
since 18.06

000000
Default

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

TextSize

Number

Size of the text
since 17.10

12
Default

Text size for the textual output in pixels.

BGColor

rgb hex

Defines the color of the text background
since 18.06

FFFFFF
Default

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