src/transform.js
function(element, options)
    {
        // Make sure the transform property is an object
        if(typeof element.transform != "object")
        {
            element.transform = {};
        }

        // If we have an object of options
        if(typeof options[0] == "object")
        {
            // Loop through object properties and save their values
            var keys = Object.keys(options[0]);

            keys.forEach(function(property)
            {
                element.transform[property] = options[0][property];
            });
        }
        
        // Otherwise, loop through all of the options to find values
        else
        {
            var property = options[0];
            var args = [];

            for(var i = 1, l = options.length; i < l; i++)
            {
                args.push(options[i]);
            }

            element.transform[property] = args;
        }
    }
function(element, options)
    {
        // Make sure the transform property is an object
        if(typeof element.transform != "object")
        {
            element.transform = {};
        }

        // If we have an object of options
        if(typeof options[0] == "object")
        {
            // Loop through object properties and save their values
            var keys = Object.keys(options[0]);

            keys.forEach(function(property)
            {
                element.transform[property] = options[0][property];
            });
        }
        
        // Otherwise, loop through all of the options to find values
        else
        {
            var property = options[0];
            var args = [];

            for(var i = 1, l = options.length; i < l; i++)
            {
                args.push(options[i]);
            }

            element.transform[property] = args;
        }
    }
function ( element , options ) { // Make sure the transform property is an object if ( typeof element . transform != "object" ) { element . transform = { } ; } // If we have an object of options if ( typeof options [ 0 ] == "object" ) { // Loop through object properties and save their values var keys = Object . keys ( options [ 0 ] ) ; keys . forEach ( function ( property ) { element . transform [ property ] = options [ 0 ] [ property ] ; } ) ; } // Otherwise, loop through all of the options to find values else { var property = options [ 0 ] ; var args = [ ] ; for ( var i = 1 , l = options . length ; i < l ; i ++ ) { args . push ( options [ i ] ) ; } element . transform [ property ] = args ; } }
Private function for saving new transform properties
Private function for saving new transform properties