Documentation

include MVC MVC.Animate MVC.Class MVC.Controller MVC.Controller.Action MVC.Controller.Action.Drag MVC.Controller.Action.Drop MVC.Controller.Action.EnterLeave MVC.Controller.Action.Event MVC.Controller.Action.Hover MVC.Controller.Action.Lasso MVC.Controller.Action.Selectable MVC.Controller.Action.Subscribe MVC.Controller.Comet MVC.Controller.Params MVC.Controller.Params.Drag MVC.Controller.Params.Drop MVC.Controller.Stateful MVC.Delegator MVC.Doc MVC.Element MVC.Event MVC.File MVC.History MVC.IO MVC.IO.Ajax MVC.IO.Comet MVC.IO.JsonP MVC.IO.WindowName MVC.IO.XDoc MVC.Model MVC.Model.Ajax MVC.Model.Cookie MVC.Model.JsonP MVC.Model.JsonRest MVC.Model.WindowName MVC.Model.XmlRest MVC.Native MVC.Native.Array MVC.Native.Date MVC.Native.Function MVC.Native.Number MVC.Native.Object MVC.Native.String MVC.Options MVC.Store MVC.SyntheticEvent MVC.Test MVC.Test.Assertions MVC.Test.Controller MVC.Test.Functional MVC.Test.Runner MVC.Test.Unit MVC.Timer MVC.Timer.Easings MVC.Vector MVC.View MVC.View.Helpers OpenAjax

MVC.Animate

Provides simple animation functionality for JavaScriptMVC.
 new MVC.Animate('element_id',
                {color: "#00FF00", width: "20px"}, 
                2000, 
                MVC.Timer.Easings.linear, 
                function(){  alert('done!')}
                );

Constructor

MVC.Animate

new MVC.Animate(element, params, duration, easing, callback) -> mvc.animate

Starts a new animation.

{HTMLElement|String} - the element or element id to animate.
{Object} - css properties to change and their value. Color values must be given like "#1289EF".
{Number} - how long the animation should take place in milliseconds. Default is 500.
{Object} - function for the object's motion.
{Function} - calls when animation has completed

is_color

is_color(style) -> MVC.Vector
For a given value, can determine if it is a color value like "#1289EF" or rgb(0,127,254).
{String} - a string containing a style value of an element.
{MVC.Vector} - a vector representing the RGB value of color.