Plugin Parameters

 

plugins

Descriptionadds a Plug-in (e.g. Fullscreen) to the viewer
SyntaxString
Default""
ContextFSI 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.



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 

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


Adding the parameter plugins:"ZoomMeter" extends the navigator window with a display of the current magnification.


The following parameters can be set:

zoomMeter

DescriptionEnable or disable the text in the navigation window.
SyntaxBoolean
Defaulttrue
ContextFSI Viewer

Enables or disable the text in the navigation window.


zoomMeter_color

DescriptionDefines the color of the text in the navigation window
Syntaxcolor
Default-
ContextFSI Viewer

Defines the color of the text in the navigation window.


zoomMeter_decimals

DescriptionNumber of decimals displayed in the navigation window
Syntaxinteger
Default2
ContextFSI Viewer

Defines the color of the text in the navigation window.


zoomMeter_srcRelative

DescriptionDecides how the percentage is displayed
Syntaxboolean
Defaulttrue

FSI Viewer

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

DescriptionTime in seconds for a full rotation
Syntaxfloat
Default-
ContextFSI 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

DescriptionTime in seconds for a full rotation
Syntaxfloat
Default-
ContextFSI 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

Descriptionprevents zooming while Autospin is activated
SyntaxBoolean
Defaultfalse
ContextFSI Viewer

Prevents zooming while clicking into the Autospin.



Button

Descriptionenables Play/Pause button
SyntaxBoolean
Defaulttrue
ContextFSI 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

DescriptionIndentation of the menu buttons
SyntaxInteger
Default0
ContextFSI Viewer

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



Mode n

DescriptionRemoves the button for mouse mode n from the menu bar
SyntaxBoolean
Default-
ContextFSI Viewer

 Provides the possibility to hide specific mouse mode buttons.



Mode nMouse Mode

Mode0

Zoom

Mode1

Pan


Mode2

Rotate 3D (X/Y Axis)


Mode3

Rotate 2D (Z Axis)



Sequence

DescriptionSequence of the buttons
SyntaxString
Default0,1,3,2
ContextFSI 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

DescriptionReal width of the entire image
SyntaxFloat
Default100.0
ContextFSI Viewer

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



Prefix

DescriptionDefines a prefix for the length value
SyntaxString
Default---
ContextFSI Viewer

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




Suffix

DescriptionDefines a suffix for the length value
SyntaxString
Defaultmm
ContextFSI Viewer

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




Initial

DescriptionDefines the coordinates of a measure section that is shown initially
SyntaxString
Default
ContextFSI 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

DescriptionShows the measurement in all mouse modes
SyntaxBoolean
Defaultfalse
ContextFSI Viewer

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



Decimals

DescriptionNumber of decimals of the length value
SyntaxNumber
Default1
ContextFSI Viewer

Defines the number of decimals of the length value.




ShowText

DescriptionDisplay the current measurement string
SyntaxBoolean
Defaulttrue
ContextFSI Viewer

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




ShowAngle

DescriptionDisplay current angle
SyntaxBoolean
Defaulttrue
ContextFSI 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

DescriptionDefines the color of the measure lines
SyntaxHexColor
DefaultFF0000
ContextFSI Viewer

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




TextColor

DescriptionDefines the color of the text
SyntaxHexColor
Default000000
ContextFSI Viewer

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




TextBorder

DescriptionDefines the color of the text border
SyntaxHexColor or "false"
Default000000
ContextPlug-in attribute
VersionFSI Viewer

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




TextSize

DescriptionSize of the text
SyntaxNumber (pixel)
Default12
ContextFSI Viewer

Text size for the textual output in pixels.




BGColor

DescriptionDefines the color of the text background
SyntaxHexColor
DefaultFFFFFF
ContextFSI Viewer

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