0
1
Fork 0
hedera-web-mindshore/web/js/htk/spinner.js

38 lines
591 B
JavaScript
Raw Normal View History

2015-11-19 13:57:23 +00:00
Htk.Spinner = new Class
({
Extends: Htk.Widget
,Tag: 'htk-spinner'
2016-05-02 13:05:49 +00:00
,_started: false
2015-11-19 13:57:23 +00:00
,initialize: function (props)
{
var loader = this.createElement ('div');
loader.className = 'htk-spinner';
var spin = document.createElement ('div');
loader.appendChild (spin);
this.spin = spin;
this.parent (props);
}
,start: function ()
{
2016-05-02 13:05:49 +00:00
if (!this._started)
{
Vn.Node.addClass (this.spin, 'spinner');
this._started = true;
}
2015-11-19 13:57:23 +00:00
}
,stop: function ()
{
2016-05-02 13:05:49 +00:00
if (this._started)
{
Vn.Node.removeClass (this.spin, 'spinner');
this._started = false;
}
2015-11-19 13:57:23 +00:00
}
});