- List
{Object} List List object
- Pattern
{Object} Pattern Pattern object
- Point
{Object} Point X & Y coordinates for an object
- Cursor
{Object} Cursor Cursor object
- Text
{Object} Text Text object
- MouseMove
{Object} MouseMove MouseMove utilization class
- pxToNumber(value) ⇒
number Converts CSS string value to number/integer
- jsonToCss(json) ⇒
string Converts the 'css' object into a CSS inline string
- setCursorType(element)
Set's the cursor type based on passed element's tag name
- getCenterPoint(element) ⇒
Point Gets the center point of an element
- mouseover(element)
Actions executed after a mouseover event
- mouseout(element)
Actions executed after a mouseout event
- createCursor(id, type)
Create and embeds cursor within DOM
- isXPath(id) ⇒
boolean Checks whether the passed id is an XPath
- isCssSelector(id) ⇒
boolean Checks whether the passed id is a CSS query selector
- isId(id) ⇒
boolean Checks whether the passed id is an element identifier
- isCamelCase(string) ⇒
boolean Checks whether a string is camel case
- isXPathOrCssSelector(id) ⇒
boolean Checks whether an id is an XPath or CSS Selector
- setUserAgent()
Identifies and sets the present user agent
- getElementByXPath(xpath) ⇒
Object Returns an element based on its XPath
- getXPath(element) ⇒
string Returns an XPath for the passed element
- getElement(id) ⇒
Object Returns a DOM's element based on its identifier
- getEasing(type) ⇒
function Returns an easing function based on the input type
- getElementByXPathOrSelector(id) ⇒
Object Returns an element based on its XPath or CSS Selector
- addGeneratedId(id) ⇒
Object Adds a generated id to the passed element
- cleanScriptCode(script) ⇒
string Cleans script of it's function wrapper
- hotkeyListener() ⇒
function Mousetrap hotkey listener for activating MouseMove.go ( )
- embedMousetrap()
Embed mousetrap script into DOM
- seedMouseEvents()
Seeds mouse binding mouse events along with unique identifiers
{Object} List List object
Kind: global class
Properties
| Name | Type | Description |
|---|---|---|
| index | number |
Index of list |
| current | string |
Current data value of list |
| length | number |
Length of list |
- List
- new List(array)
- instance
- static
- .isList(array) ⇒
boolean
- .isList(array) ⇒
Creates a list
| Param | Type | Description |
|---|---|---|
| array | Array |
Array list |
Set index property
Kind: instance property of List
| Param | Type | Description |
|---|---|---|
| value | number |
Index value |
Get index property
Kind: instance property of List
Returns: number - Index value
Set current value
Kind: instance property of List
| Param | Type | Description |
|---|---|---|
| value | string |
Current data value |
Get current value
Kind: instance property of List
Returns: string - Current data value
Get current DOM identifier
Kind: instance property of List
Returns: string - Current DOM identifier
Go to next value in list
Kind: instance method of List
Returns: string - Identifier for DOM
Note: increment after completion
Go to previous value in list
Kind: instance method of List
Returns: string - Identifier of DOM
Note: increment before completion
Checks whether the passed value is an instance of List
Kind: static method of List
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| array | List |
List instance |
{Object} Pattern Pattern object
Kind: global class
Properties
| Name | Type | Description |
|---|---|---|
| index | number |
Index of list |
| current | string |
Current data value of list |
| length | number |
Length of list |
- Pattern
- new Pattern(array)
- instance
- .index
- .index ⇒
number - .current
- .current ⇒
Object - .currentId ⇒
string - .currentAction ⇒
string - .next() ⇒
string - .prev() ⇒
string - .indexOfId(id)
- .insert(index, object)
- static
- .isPattern(arrayOfObjects) ⇒
boolean
- .isPattern(arrayOfObjects) ⇒
Creates a list
| Param | Type | Description |
|---|---|---|
| array | Array |
Array list |
Set index property
Kind: instance property of Pattern
| Param | Type | Description |
|---|---|---|
| value | number |
Index value |
Get index property
Kind: instance property of Pattern
Returns: number - Index value
Set current value
Kind: instance property of Pattern
| Param | Type | Description |
|---|---|---|
| value | string |
Current data value |
Get current value
Kind: instance property of Pattern
Returns: Object - Current data value
Get current DOM identifier
Kind: instance property of Pattern
Returns: string - Current DOM Identifier
Get current action
Kind: instance property of Pattern
Returns: string - Current action
Go to next value in list
Kind: instance method of Pattern
Returns: string - Identifier for DOM
Note: increment after completion
Go to previous value in list
Kind: instance method of Pattern
Returns: string - Identifier of DOM
Note: increment before completion
Returns the index of the passed id; within the pattern array
Kind: instance method of Pattern
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of DOM; XPath, CSS Selector |
Inserts an object at the index provided
Kind: instance method of Pattern
| Param | Type | Description |
|---|---|---|
| index | number |
Index number to insert into |
| object | Object |
Implicitly of explicitly declared object; see README.md |
Checks whether the passed value is an instance of Pattern
Kind: static method of Pattern
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| arrayOfObjects | Pattern |
Pattern instance |
{Object} Point X & Y coordinates for an object
Kind: global class
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| [x] | number |
0 |
X - x-axis coordinate |
| [y] | number |
0 |
Y - y-axis coordinate |
- Point
- new Point(x, y)
- instance
- static
- .isPoint(object) ⇒
boolean
- .isPoint(object) ⇒
Create a point
| Param | Type | Description |
|---|---|---|
| x | number |
X coordinate value |
| y | number |
Y coordinate value |
Set x-axis value
Kind: instance property of Point
| Param | Type | Description |
|---|---|---|
| value | number |
X coordinate value |
Get x-axis value
Kind: instance property of Point
Returns: number - X coordinate value
Set the y-axis value
Kind: instance property of Point
| Param | Type | Description |
|---|---|---|
| value | number |
Y coordinate value |
Get y-axis value
Kind: instance property of Point
Returns: number - Y coordinate value
Checks whether the passed object is an instance of Point
Kind: static method of Point
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| object | Point |
Point instance |
{Object} Cursor Cursor object
Kind: global class
Properties
| Name | Type | Description |
|---|---|---|
| position | Point |
X & Y axis coordinates |
| id | string |
Cursor's DOM identifier |
| type | string |
Type of cursor |
| config | Object |
Internal private configuration |
| tools | Object |
Internal private utility methods |
- Cursor
- new Cursor(position, id, type)
- instance
- static
- .isCursor(value) ⇒
boolean
- .isCursor(value) ⇒
Create a single instance of a Cursor
| Param | Type | Description |
|---|---|---|
| position | string |
X & Y axis coordinates |
| id | string |
Cursor's DOM identifier |
| type | string |
Type of cursor, within #_cursors |
Set id property
Kind: instance property of Cursor
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of Cursor |
Get id property
Kind: instance property of Cursor
Returns: string - Identifier of Cursor
Set type property
Kind: instance property of Cursor
| Param | Type | Description |
|---|---|---|
| value | string |
Type property |
Get type property
Kind: instance property of Cursor
| Param | Type | Description |
|---|---|---|
| Type | string |
property |
Set position property
Kind: instance property of Cursor
| Param | Type | Description |
|---|---|---|
| point | Point |
X & Y coordinates |
cursor.position ⇒ Point
Get position property
Kind: instance property of Cursor
Returns: Point - X & Y coordinates
Set distance property
Kind: instance property of Cursor
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of element |
Get distance property
Kind: instance property of Cursor
Returns: number - Distance from last distance check
Set angle property
Kind: instance property of Cursor
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of element |
Get angle property
Kind: instance property of Cursor
Returns: number - Angle property; in radians
Sets the next element
Kind: instance method of Cursor
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of element within DOM |
Sends cursor to the location of the next element
Kind: instance method of Cursor
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of element within DOM |
Initiates any mouse actions associated with the passed 'element'
Kind: instance method of Cursor
| Param | Type | Description |
|---|---|---|
| element | HTMLElement |
HTML DOM element |
Switch cursor's visual type
Kind: instance method of Cursor
| Param | Type | Default | Description |
|---|---|---|---|
| type | string |
"pointer" |
Cursor type within #config.presentation [ os ].cursors [ type ] |
Creates and mirrors a select input element; from the DOM
Kind: instance method of Cursor
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of element within DOM |
| id | string |
Identifier of element within DOM |
Set's this cursor's mouse interaction type; with other DOM elements
Kind: instance method of Cursor
Checks whether the passed value is an instance of Cursor
Kind: static method of Cursor
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| value | Cursor |
Cursor instance |
{Object} Text Text object
Writes text within an input element
Kind: static method of Text
| Param | Type | Default | Description |
|---|---|---|---|
| text | string |
Text output | |
| id | string |
Input Identifier | |
| [timing] | number |
120 |
Timing interval for typing |
{Object} MouseMove MouseMove utilization class
Kind: global class
Properties
| Name | Type | Description |
|---|---|---|
| sequence | Pattern | List |
Pattern or List object |
| cursor | Cursor |
Cursor object |
| animation | string |
Cursor linear animation |
| config | Object |
Internal private configuration |
| tools | Object |
Internal private utility methods |
- MouseMove
- new MouseMove(sequence, cursor)
- .sequence
- .sequence ⇒
Array - .cursor
- .cursor ⇒
Cursor - .animation
- .animation ⇒
string - .go(duration)
Create a single instance of MouseMove
| Param | Type | Description |
|---|---|---|
| sequence | Array |
Pattern or List of DOM identifiers |
| cursor | Cursor |
Cursor object |
Set sequence property
Kind: instance property of MouseMove
| Param | Type | Description |
|---|---|---|
| array | Array |
Array object |
Get sequence property
Kind: instance property of MouseMove
Returns: Array - List or Pattern instance
Set cursor property
Kind: instance property of MouseMove
| Param | Type | Description |
|---|---|---|
| cursor | Cursor |
Cursor object |
mouseMove.cursor ⇒ Cursor
Get cursor property
Kind: instance property of MouseMove
Returns: Cursor - Cursor object
Set animation property
Kind: instance property of MouseMove
| Param | Type | Description |
|---|---|---|
| value | string |
Animation type within #config.animations |
Get animation property
Kind: instance property of MouseMove
Returns: string - Animation type
Animate cursor
Kind: instance method of MouseMove
| Param | Type | Description |
|---|---|---|
| duration | number |
Duration of the animation |
Converts CSS string value to number/integer
Kind: global function
Returns: number - Number value of parsed value
| Param | Type | Description |
|---|---|---|
| value | string |
CSS string value in pixels |
Converts the 'css' object into a CSS inline string
Kind: global function
Returns: string - CSS inline string
| Param | Type | Description |
|---|---|---|
| json | object |
CSS object from #config.presentation.settings.css [ type ] |
Set's the cursor type based on passed element's tag name
Kind: global function
| Param | Type | Description |
|---|---|---|
| element | Object |
HTML DOM element |
getCenterPoint(element) ⇒ Point
Gets the center point of an element
Kind: global function
Returns: Point - X & Y Coordinates
| Param | Type | Description |
|---|---|---|
| element | Object |
HTML DOM element |
Actions executed after a mouseover event
Kind: global function
| Param | Type | Description |
|---|---|---|
| element | HTMLElement |
HTML DOM element |
Actions executed after a mouseout event
Kind: global function
| Param | Type | Description |
|---|---|---|
| element | HTMLElement |
HTML DOM element |
Create and embeds cursor within DOM
Kind: global function
| Param | Type | Description |
|---|---|---|
| id | string |
Identifier of cursor |
| type | string |
Cursor type within #config.presentation [ os ].cursors [ type ] |
Checks whether the passed id is an XPath
Kind: global function
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| id | string |
XPath |
Checks whether the passed id is a CSS query selector
Kind: global function
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| id | string |
CSS query selector |
Checks whether the passed id is an element identifier
Kind: global function
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| id | string |
Element identifier |
Checks whether a string is camel case
Kind: global function
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| string | string |
Camel case string |
Checks whether an id is an XPath or CSS Selector
Kind: global function
Returns: boolean - True | False
| Param | Type | Description |
|---|---|---|
| id | string |
XPath or CSS Selector |
Identifies and sets the present user agent
Returns an element based on its XPath
Kind: global function
Returns: Object - HTML DOM element
| Param | Type | Description |
|---|---|---|
| xpath | string |
XPath |
Returns an XPath for the passed element
Kind: global function
Returns: string - XPath
| Param | Type | Description |
|---|---|---|
| element | Object |
HTML DOM element |
Returns a DOM's element based on its identifier
Kind: global function
Returns: Object - HTML DOM element
| Param | Type | Description |
|---|---|---|
| id | string |
CSS query, identifier, or XPath |
Returns an easing function based on the input type
Kind: global function
Returns: function - Easing function from #config.animation.ease
| Param | Type | Description |
|---|---|---|
| type | string |
Type of easing animation, in camel case: i.e.: 'easeInSine' |
Converts camel case string into an . for bracket notation
Kind: inner method of getEasing
Returns: Array - Array of strings
| Param | Type | Description |
|---|---|---|
| string | string |
Camel case string to split |
Returns an element based on its XPath or CSS Selector
Kind: global function
Returns: Object - HTML DOM element
| Param | Type | Description |
|---|---|---|
| id | string |
XPath or CSS Selector |
Adds a generated id to the passed element
Kind: global function
Returns: Object - element HTML DOM element
| Param | Type | Description |
|---|---|---|
| id | string |
Element identifier |
Cleans script of it's function wrapper
Kind: global function
Returns: string - Function as a string
| Param | Type | Description |
|---|---|---|
| script | function |
JavaScript function |
Mousetrap hotkey listener for activating MouseMove.go ( )
Kind: global function
Returns: function - Mousetrap hotkey listener
Embed mousetrap script into DOM
Seeds mouse binding mouse events along with unique identifiers
Kind: global function