new Com()
The main constructor function for a new component
Methods
(private, static) _bind()
Bind an event to an element and store the reference in the event object it is practical for the components to store the events internally when not a list of objects to reduce aim.$ initializations
(static) _Device()
Check the device type for the calling browser
(static) _initialize(options, data)
Initialize the component object
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options to pass to the component |
data |
Object | The optional startup data for the component |
(private, static) _removeEvents()
Remove the events from all component elements, this will loop through the events object and destroy all events
(static) _render()
The default render function to render the component elements
(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 |
(static) _setElements()
Set the default elements for the object
(private, static) _setEvents()
Set the events for the component, this method will be overridden per component
(static) _setOptions(options)
Set the component options as properties of the component
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options to pass to the component |
(protected, static) cancelAnimation(timer)
Feature detection cancelAnimationFrame
Parameters:
Name | Type | Description |
---|---|---|
timer |
function | The timer to cancel |
(static) create()
Create the new object instance and auto initialize
(static) destroy()
Destroy the component object
(static) disable()
Disable the component object
(static) enable()
Enable the component object
(static) extend()
Extend function to allow object extension of the aim.com
(private, static) onTouch()
A Common onTouch handler for grabbing the mouse position
(private, static) onTouchMove()
Handle the touch move event and determines the direction
(static) send(params)
Send an AJAX Request to a server, passsing the parameters to execute and send to the server
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | The parameters to pass to the server of the format { type:'POST', url:'PATH_TO_SERVER', dataType:'JSON_XML_FILE', data:'OBJECT', headers:'OBJECT', readystate:function(a, b){ console.log(a, b); }, success:function(){ }, error:function(){} encode:null } |
(static) setEl(options, data)
Set the default elements for the object
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | The options to pass to the component |
data |
Object | The optional startup data for the component |
(static) update()
Update the component object