From 8744e552f292e4d4806d68082c77cfbb113f0179 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sun, 15 May 2022 22:47:07 +0200 Subject: [PATCH] fix: refactor recorder Signed-off-by: Matej Focko --- recorder.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/recorder.js b/recorder.js index ff71bb5..28e26a7 100644 --- a/recorder.js +++ b/recorder.js @@ -20,15 +20,18 @@ class Recorder { this.textBox = textBox; this.id = id; - this.rendered = -1; - this.rendering = false; this.atOnce = false; - this.states = new Array(); - + this.clear(); this.initGraph(); } + clear() { + this.rendered = -1; + this.rendering = false; + this.states = new Array(); + } + renderAtOnce() { this.atOnce = true; return this;