Release
This commit is contained in:
38
client/core/spin/spin.js
Normal file
38
client/core/spin/spin.js
Normal file
@@ -0,0 +1,38 @@
|
||||
modules.define(
|
||||
'spin',
|
||||
[
|
||||
'y-block',
|
||||
'inherit'
|
||||
],
|
||||
function (
|
||||
provide,
|
||||
YBlock,
|
||||
inherit
|
||||
) {
|
||||
|
||||
var Spin = inherit(YBlock, {
|
||||
__constructor: function () {
|
||||
this.__base.apply(this, arguments);
|
||||
},
|
||||
/**
|
||||
* Останаваливает анимацию спиннера
|
||||
*/
|
||||
stop: function () {
|
||||
this._removeState('progressed');
|
||||
},
|
||||
|
||||
/**
|
||||
* Запускает анимацию спиннера
|
||||
*/
|
||||
start: function () {
|
||||
this._setState('progressed');
|
||||
}
|
||||
|
||||
}, {
|
||||
getBlockName: function () {
|
||||
return 'spin';
|
||||
}
|
||||
});
|
||||
|
||||
provide(Spin);
|
||||
});
|
||||
Reference in New Issue
Block a user