mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
31 lines
832 B
JavaScript
31 lines
832 B
JavaScript
/** @module ActionCollection */
|
|
kit.PluginManager.register('ActionCollection', function(module, exports, require, global) {
|
|
|
|
var Collection = require('Collection');
|
|
var support = require('support');
|
|
|
|
/**
|
|
* @class ActionCollection
|
|
* @extends {Collection}
|
|
* @memberOf kit
|
|
*/
|
|
var ActionCollection = function (list = []) {
|
|
Collection.prototype.constructor.apply(this, arguments);
|
|
};
|
|
var proto = ActionCollection.prototype;
|
|
|
|
proto.run = function (count = -1) {
|
|
this.map(function (action) {
|
|
action.run(count);
|
|
})
|
|
};
|
|
proto.stop = function () {
|
|
this.map(function (action) {
|
|
action.stop();
|
|
})
|
|
};
|
|
|
|
support.extend(ActionCollection.prototype, Collection.prototype);
|
|
|
|
return module.exports = ActionCollection;
|
|
}); |