add debug arg to ppty
This commit is contained in:
parent
44bff3affd
commit
ce335eb915
2 changed files with 31 additions and 21 deletions
|
|
@ -8,8 +8,8 @@ function animDelta(anim) {
|
|||
class PPTY {
|
||||
#root;
|
||||
#blockOptions;
|
||||
#startCallback = _ => { };
|
||||
#finishCallback = _ => { };
|
||||
#startCallback = (root, debug) => { };
|
||||
#finishCallback = (root, debug) => { };
|
||||
|
||||
constructor(root, blockOptions) {
|
||||
this.#root = root;
|
||||
|
|
@ -26,10 +26,13 @@ class PPTY {
|
|||
return this;
|
||||
}
|
||||
|
||||
run() {
|
||||
run(debug = false) {
|
||||
var delay = 0;
|
||||
|
||||
this.#startCallback(this.#root);
|
||||
this.#startCallback(this.#root, debug);
|
||||
|
||||
if (debug)
|
||||
return this.#finishCallback(this.#root, debug);
|
||||
|
||||
this.#root
|
||||
.querySelectorAll(".ppty-block")
|
||||
|
|
@ -120,7 +123,7 @@ class PPTY {
|
|||
setTimeout(() => {
|
||||
command.style.borderRightColor = "transparent";
|
||||
if (index == blocks.length - 1)
|
||||
this.#finishCallback(this.#root);
|
||||
this.#finishCallback(this.#root, debug);
|
||||
}, delay);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue