Barely working basic playback

This commit is contained in:
Blue 2018-12-17 20:15:58 +03:00 committed by Gitea
parent 2a4dce3616
commit 85a14b5101
19 changed files with 406 additions and 24 deletions

View file

@ -58,10 +58,8 @@
if (this._enabled !== enabled) {
this._enabled = enabled;
if (this._enabled) {
this.addClass("hoverable");
this.removeClass("disabled");
} else {
this.removeClass("hoverable");
this.addClass("disabled");
}
}

View file

@ -78,11 +78,7 @@
Subscribable.fn.destructor.call(this);
},
"addClass": function(className) {
var arr = this._e.className.split(" ");
if (arr.indexOf(className) === -1) {
arr.push(className);
this._e.className = arr.join(" ");
}
this._e.classList.add(className);
},
"_applyProperties": function() {
for (var i = 0; i < this._f.properties.length; ++i) {
@ -141,17 +137,7 @@
}
},
"removeClass": function(className) {
var arr = this._e.className.split(" ");
var index = arr.indexOf(className)
var toJoin = false;
while (index !== -1) {
arr.splice(index, 1);
index = arr.indexOf(className)
toJoin = true;
}
if (toJoin) {
this._e.className = arr.join(" ");
}
this._e.classList.remove(className);
},
"_resetTheme": function() {
this._onClearProperties();