define('application/widgets/gradient', [
'rofl/widgets/container'
], function (
Container
) {
'use strict';
var DIRECTIONS = {
TOPDOWN: 'top-down',
BOTTOMUP: 'bottom-up'
},
Gradient;
Gradient = Container.extend({
/**
* Gradient initialisation.
*
* @param {string} [direction] - The direction. Defaults to TOPDOWN.
*/
init: function init (direction) {
init.base.call(this);
direction = direction || DIRECTIONS.TOPDOWN;
this.addClass('gradient');
this.addClass(direction);
}
});
Gradient.DIRECTIONS = DIRECTIONS;
return Gradient;
});