Cone.js

API Docs for: 1.0.1
Show:

Cone.List

Summary

Management of Cone instances lists made easier

Instance methods made available directly on the list, and lots of other things.

Constructor

Cone.List

Syntax

Cone.List

(
  • coneList
)
Cone.List

Summary

Parameters:

  • coneList Array | Cone

Returns:

Item Index

Methods

addMethods

Syntax

addMethods

(
  • methodList
)
Undefined static

Summary

This method is used internally to expose methods that are used both on Cone and Cone.List

You will use it when you make your own plugins to expose your own methods

Parameters:

  • methodList Object

    List of the methods to add to the cone list prototype

Returns:

Undefined:

Example:

//at the end of your file
                    Cone.addMethods(stateFullMethods);
                    Cone.List.addMethods(stateFullMethods);
                    

animate

Syntax

animate

(
  • options
)
Cone.List chainable

Summary

Run any animate methods such as :

  • animateAlpha
  • animateScale
  • bump
  • fadeIn
  • fadeOut
  • unWidenEyes
  • widenEyes
  • moveTo

Just specify it in options.method. Those methods are also accessible via the same shortcuts like you would use on a Cone instance.

Parameters:

  • options Object

    same options as the ones on the cone for each animation method

Returns:

Example:

//you can use the .animate() dispatcher as well as the shortcuts, directly on a conelist :
                    var myConeList = new ConeList([myCone1,myCone2,myCone3]);
                    myConeList
                     .fadeOut()
                     .fadeIn()
                     .delay(1000)
                     .widenEyes()
                     .unWidenEyes()
                     .then(function(next){myConeList.setColor('#900000'); next()})
                     .bump();
                    

changeStateDispatcher

Syntax

changeStateDispatcher

(
  • coneList
  • methodName
  • args
)
Cone.List private

Summary

Parameters:

Returns:

each

Syntax

each

(
  • callback
)
Cone.List chainable

Summary

Loops through the cone list providing a callback like function(cone, index){}

Return false in the callback to stop the loop

Parameters:

Returns: