Mouse and Touch Actions

JS9 supports the following configurable mouse and touch actions: The initial actions are defined by the JS9.globalOpts.mouseActions and JS9.globalOpts.touchActions arrays. In addition, the JS9.globalOpts.mousetouchZoom property specifies whether a mouse wheel or touch/pinch will zoom the image. The default actions are: where the array elements map to an increasing numbers of buttons/fingers. You can change the default actions of the elements in either array in your js9Prefs.json file. For example, to make pan and zoom the default one-touch and pinch actions respectively: As usual, the defaults in js9Prefs.json are used by all JS9 displays in a web page.

Users can change the action assignments using the MouseTouch plugin, which displays the current mapping between mouse/touch gesture and its action. Simply drag and drop an action to a different gesture in order to change the mapping. You also can toggle the scroll/pinch to zoom capability by clicking its button.