Class: EventsHandler

PSV.services.EventsHandler

new PSV.services.EventsHandler (psv)

Events handler

Name Type Description
psv PSV.Viewer

Extends

Members

config PSV.Options readonly inherited overrides

Configuration holder

prop Object readonly inherited overrides

Properties holder

Reference to main controller

state Object protected

Internal properties

Properties:
Name Type Description
moveThreshold number

computed threshold based on device pixel ratio

step number
mousedown boolean

before moving past the threshold

startMouseX number

start x position of the click/touch

startMouseY number

start y position of the click/touch

mouseX number

current x position of the cursor

mouseY number

current y position of the cursor

mouseHistory Array.<Array.<number>>

list of latest positions of the cursor, [time, x, y]

pinchDist number

distance between fingers when zooming

keyHandler PressHandler
ctrlKeyDown boolean

when the Ctrl key is pressed

dblclickData PSV.ClickData

temporary storage of click data between two clicks

dblclickTimeout number

timeout id for double click

twofingersTimeout number

timeout id for "two fingers" overlay

ctrlZoomTimeout number

timeout id for "ctrol zoom" overlay

Methods

__fullscreenToggled (force) package

Handles fullscreen events

Name Type Description
force boolean optional

force state

Fires:

destroy () inherited overrides

Destroys the service

disableKeyboard () protected

Disables the keyboard controls

enableKeyboard () protected

Enables the keyboard controls

init () protected

Initializes event handlers