Class Guacamole.Mouse.Touchscreen
Defined in: mouse.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Guacamole.Mouse.Touchscreen(element)
Provides cross-browser absolute touch event translation for a given element.
|
Field Attributes | Field Name and Description |
---|---|
The current mouse state.
|
|
The distance a two-finger touch must move per scrollwheel event, in
pixels.
|
Event Attributes | Event Name and Description |
---|---|
onmousedown(state)
Fired whenever a mouse button is effectively pressed.
|
|
onmousemove(state)
Fired whenever the user moves the mouse by dragging their finger over
the touchscreen element.
|
|
onmouseup(state)
Fired whenever a mouse button is effectively released.
|
Class Detail
Guacamole.Mouse.Touchscreen(element)
Provides cross-browser absolute touch event translation for a given element.
Touch events are translated into mouse events as if the touches occurred
on a touchscreen (tapping anywhere on the screen clicks at that point,
long-press to right-click).
- Parameters:
- {Element} element
- The Element to use to provide touch events.
Field Detail
{Guacamole.Mouse.State}
currentState
The current mouse state. The properties of this state are updated when
mouse events fire. This state object is also passed in as a parameter to
the handler of any mouse events.
scrollThreshold
The distance a two-finger touch must move per scrollwheel event, in
pixels.
Event Detail
onmousedown(state)
Fired whenever a mouse button is effectively pressed. This can happen
as part of a "mousedown" gesture initiated by the user by pressing one
finger over the touchscreen element, as part of a "scroll" gesture
initiated by dragging two fingers up or down, etc.
- Parameters:
- {Guacamole.Mouse.State} state
- The current mouse state.
onmousemove(state)
Fired whenever the user moves the mouse by dragging their finger over
the touchscreen element. Note that unlike Guacamole.Mouse.Touchpad,
dragging a finger over the touchscreen element will always cause
the mouse button to be effectively down, as if clicking-and-dragging.
- Parameters:
- {Guacamole.Mouse.State} state
- The current mouse state.
onmouseup(state)
Fired whenever a mouse button is effectively released. This can happen
as part of a "mouseup" gesture initiated by the user by removing the
finger pressed against the touchscreen element, or as part of a "scroll"
gesture initiated by dragging two fingers up or down, etc.
- Parameters:
- {Guacamole.Mouse.State} state
- The current mouse state.