Tridi — Touch support

Tridi supports touch events out of the box with no configuration required. Touch support can be disabled by setting touch option to false.

Rotation speed for touch events can be adjusted by passing an integer to touchDragInterval option. Setting touchDragInterval does not affect dragInterval option which affects mouse events only. It is therefore possible to fine-tune rotation speeds for desktop and mobile users independently.

Options

  • touch (boolean) - enables / disables touch events. Optional, defaults to true
  • touchDragInterval (number) - adjusts rotation speed. Higher number means more touchmove is required for a single rotation cycle. Optional, defaults to 2

Code

HTML

<div id="tridi-touch"></div>

JavaScript

new Tridi({
  element: '#tridi-touch',
  location: './path/to/image/folder',
  format: 'jpg',
  count: 36,
  touchDragInterval: 1
}).load();

« Back to main page