Our Viewer solutions have the ability to perform actions based on 3 types of Instant and 2 types of Continuous Gestures.
Gestures can currently be attached to Pages, Subpages and Image objects.
The use of Images and Subpages with attached Gestures allows you to create only certain areas of the interface which react to a gesture.
Click on any object that accepts Gestures (for Pages, click on the page orientation node in the Project Tree. For Subpages, click on their name in the Project Tree) and the Gesture Manager will enable, showing any previously attached Gestures.
From the Gesture Manager window you can create, edit and delete Gestures for a specific object. See the Gesture Manager topic for help with managing gestures in your project.
You can perform advanced gesture processing with iViewer JavaScript. A complete description of our JS gesture interface is in our Scripting Documentation
Each gesture can have multiple actions assigned to it, each triggering at different states of the gesture, known as beginning, change and end events.
Instant gestures happen immediately, with all actions happening immediately as soon as the gesture is detected, but still in order of begin, then end. There is no 'change' event for Instant Gestures. The end actions will be triggered immediately after the begin actions.
Continuous gestures have begin, change and end events which are triggered as they happen. Change events occur whenever the fingers move during the gesture.
Taps are a quick press and release on the touchscreen, in a single motion. They can be defined with between 1 and 10 finger touches. Tap gestures can also specify the number of taps, like a double click on a mouse. The number of taps can range from 1 to any number. But if you have a gesture assigned for two taps and one for three taps, both gestures will be triggered when performing a triple tap on the device.
There are some tokens created by default which can be used in dynamic commands:
[startx]
and [x]
= X position of the gesture.[starty]
and [y]
= Y position of the gesture.
Press gestures are a way to define multi-touch press actions. You can define the number of 'finger touches', just like with a Tap gesture. Press gestures fire as soon as the object is pressed.
There are some tokens created by default which can be used in dynamic commands:
[startx]
and [x]
= X position of the gesture.[starty]
and [y]
= Y position of the gesture.
Swipe gestures allow for quick swipes in up/down/left or right directions. The number of finger touches can be defined, from 1 to 10. A swipe gesture fires as soon as its detected. There is no beginning and end of a swipe. Swipes are great for quick volume control or lighting control.
There are some tokens created by default which can be used in dynamic commands:
[startx]
= start X position of the gesture.[starty]
= start Y position of the gesture.[x]
= X position at the end of the gesture.[y]
= Y position at the end of the gesture.
The pinch zoom gesture uses two fingers and allows you to perform actions based on moving two fingers closer and further apart. Pinch Zoom could be used for precise lighting control as an example. This gesture is commonly used in the Maps application on iPhone.
There are some tokens created by default which can be used in dynamic commands:
[distance]
= Distance in pixels between the two fingers at the start of the gesture. Use the scale to figure out distances during change events.[velocity]
= rate at which the fingers are moving. Negative velocity occurs when fingers get closer together.[scale]
= difference between finger positions from the start of the gesture. < 1 means fingers are closer together. > 1 means further apart than the beginning of the gesture.[startx]
= start X position of the centroid of the gesture. This is the X position at the mid point between the two fingers at the start of the gesture.[starty]
= start Y position of the centroid of the gesture. This is the Y position at the mid point between the two fingers at the start of the gesture.[x]
= X position of the centroid of the gesture. This is the X position at the mid point between the two fingers at any time after the beginning of the gesture.[y]
= Y position of the centroid of the gesture. This is the Y position at the mid point between the two fingers at any time after the beginning of the gesture.[deltax]
= the difference between the [startx] and [x] at any time in the gesture.[deltay]
= the difference between the [starty] and [y] at any time in the gesture.The rotate gesture uses two fingers and allows you to perform actions based on rotating two fingers like turning a knob on a control panel. Rotate could be used for precise volume control as an example. There are some tokens created by default which can be used in dynamic commands:
[rotation]
= angle in radians since the start of the gesture. This starts at 0 and increases as you rotate clockwise, decreases when rotating anti-clockwise. Use the rtod() math function to convert the radian value to degrees when required.[velocity]
= rotation rate expressed in radians per second.[startx]
= start X position of the centroid of the gesture. This is the X position at the mid point between the two fingers at the start of the gesture.[starty]
= start Y position of the centroid of the gesture. This is the Y position at the mid point between the two fingers at the start of the gesture.[x]
= X position of the centroid of the gesture. This is the X position at the mid point between the two fingers at any time after the beginning of the gesture.[y]
= Y position of the centroid of the gesture. This is the Y position at the mid point between the two fingers at any time after the beginning of the gesture.[deltax]
= the difference between the [startx] and [x] at any time in the gesture.[deltay]
= the difference between the [starty] and [y] at any time in the gesture.The pan gesture allows you to track finger movement on an object. This is similar to panning around a webpage is safari on an iPad. There are some tokens created by default which can be used in dynamic commands:
[startx]
= start X position of the centroid of the gesture. This is the X position at the point of the finger at the start of the gesture.[starty]
= start Y position of the centroid of the gesture. This is the Y position at the point of the finger at the start of the gesture.[x]
= X position of the centroid of the gesture. This is the X position at the point of the finger at any time after the beginning of the gesture.[y]
= Y position of the centroid of the gesture. This is the Y position at the point of the finger at any time after the beginning of the gesture.[deltax]
= the difference between the [startx] and [x] at any time in the gesture.[deltay]
= the difference between the [starty] and [y] at any time in the gesture.[velocityx]
= rate at which the fingers are moving horizontally.[velocityy]
= rate at which the fingers are moving vertically.