Add behavior model

This commit is contained in:
2022-03-25 15:40:15 +08:00
parent 021e2e7821
commit 156b4651f5
4 changed files with 384 additions and 36 deletions
+4 -4
View File
@@ -83,13 +83,13 @@ class Status extends Emitter<IStatusEvent> {
*/
public focusLabel?: Label;
private drawtimer?: NodeJS.Timeout;
private drawTimer?: NodeJS.Timeout;
private delayDraw = () => {
this.drawtimer ? clearTimeout(this.drawtimer) : null;
this.drawtimer = setTimeout(() => {
this.drawTimer ? clearTimeout(this.drawTimer) : null;
this.drawTimer = setTimeout(() => {
this.model.draw();
this.drawtimer = undefined;
this.drawTimer = undefined;
});
}