core

core

Properties:
Name Type Description
Initialized Boolean

Initialized Boolean to determine if aim.core has already initialized

autoTouch Boolean

Determines whether touch events should automatically be added when the standard mouseevents are added to an element

mouseOutput Boolean

Mouse position output display

hideContextMenu Boolean

Defines whether the browser context menu should be hidden

overrideDragStart Boolean

Defines if the default dragstart should be overriden

cancelDefaultGesture Boolean

Defines whether default gestures should be cancelled

captureMousePosition Boolean

Defines whether the mouse position onscreen should be captured

requestAnimeSpeed Number

Default Animation speed

preventDefaults Boolean

Auto Prevent default actions for touch devices

previousX Number

Previous Mouse X Position, required to determine the swipe direction for the touch events

previousY Number

Previous Mouse Y Position, required to determine the swipe direction for the touch events

mouseX Number

The current mouse X position

mouseY Number

The current mouse Y position

This is the core module used by all other modules, specifically the ui components as several require the mouse position

Methods

(protected, static) addEvent(object, evnt, callback, bubbles, scope)

Set and event for an element

Parameters:
Name Type Description
object object

The element to bind the event to

evnt string

The event name to bind

callback function

The callback function to bind to

bubbles boolean

Determine whether event bubbling supported

scope object

The scope of the function

(protected, static) cancelAnimation(timer)

Feature detection cancelAnimationFrame

Parameters:
Name Type Description
timer function

The timer to cancel

(protected, static) getElement(value)

Get an element from an AIM.$ or otherwise determine the root of the element

Parameters:
Name Type Description
value *

The value to check if it is an AIM.$, HTML Element or string

(protected, static) getMouseXY(evnt)

Get the current client mouse X and Y positions

Parameters:
Name Type Description
evnt object

The window event object

(protected, static) init(options)

Initialize the AIM Object default properties, events and functionality

Parameters:
Name Type Description
options Object

The options to pass to the initialization

(protected, static) removeEvent(object, evnt, callback, bubbles)

Clear and event for an element

Parameters:
Name Type Description
object object

The element to unbind the event from

evnt string

The event name to unbind

callback function

The callback function to bind to

bubbles boolean

Determine whether event bubbling supported

(protected, static) requestAnimation(callback, speed)

Feature detection requestAnimationFrame

Parameters:
Name Type Description
callback function

The callback function to execute

speed Number

Optional speed override for the default speed

(protected, static) setOptions(properties, override)

Set options for AIM or an alternate

Parameters:
Name Type Description
properties Object

The properties to set

override Object

Defines whether the properties are being set on the aim.core object, or an object of user specification