Class Index | File Index

Classes


Class Guacamole.Mouse.State


Defined in: Mouse.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Guacamole.Mouse.State(x, y, left, middle, right, up, down)
Simple container for properties describing the state of a mouse.
Field Summary
Field Attributes Field Name and Description
 
Whether the down mouse button is currently pressed.
 
Whether the left mouse button is currently pressed.
 
Whether the middle mouse button is currently pressed.
 
Whether the right mouse button is currently pressed.
 
up
Whether the up mouse button is currently pressed.
 
x
The current X position of the mouse pointer.
 
y
The current Y position of the mouse pointer.
Method Summary
Method Attributes Method Name and Description
 
fromClientPosition(element, clientX, clientY)
Updates the position represented within this state object by the given element and clientX/clientY coordinates (commonly available within event objects).
Class Detail
Guacamole.Mouse.State(x, y, left, middle, right, up, down)
Simple container for properties describing the state of a mouse.
Parameters:
{Number} x
The X position of the mouse pointer in pixels.
{Number} y
The Y position of the mouse pointer in pixels.
{Boolean} left
Whether the left mouse button is pressed.
{Boolean} middle
Whether the middle mouse button is pressed.
{Boolean} right
Whether the right mouse button is pressed.
{Boolean} up
Whether the up mouse button is pressed (the fourth button, usually part of a scroll wheel).
{Boolean} down
Whether the down mouse button is pressed (the fifth button, usually part of a scroll wheel).
Field Detail
{Boolean} down
Whether the down mouse button is currently pressed. This is the fifth mouse button, associated with downward scrolling of the mouse scroll wheel.

{Boolean} left
Whether the left mouse button is currently pressed.

{Boolean} middle
Whether the middle mouse button is currently pressed.

{Boolean} right
Whether the right mouse button is currently pressed.

{Boolean} up
Whether the up mouse button is currently pressed. This is the fourth mouse button, associated with upward scrolling of the mouse scroll wheel.

{Number} x
The current X position of the mouse pointer.

{Number} y
The current Y position of the mouse pointer.
Method Detail
fromClientPosition(element, clientX, clientY)
Updates the position represented within this state object by the given element and clientX/clientY coordinates (commonly available within event objects). Position is translated from clientX/clientY (relative to viewport) to element-relative coordinates.
Parameters:
{Element} element
The element the coordinates should be relative to.
{Number} clientX
The X coordinate to translate, viewport-relative.
{Number} clientY
The Y coordinate to translate, viewport-relative.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jun 10 2015 21:35:44 GMT-0700 (PDT)