From 28017ce15a36d88ef1a2ccb9dfc4c6793e0872d8 Mon Sep 17 00:00:00 2001 From: Simon Muchau <38854880+BododB@users.noreply.github.com> Date: Wed, 17 Mar 2021 23:13:42 +0100 Subject: [PATCH] resetting plot works (#163) --- src/renderer/components/EvalPlot.vue | 4 ++++ src/renderer/components/EvalPlotButton.vue | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/EvalPlot.vue b/src/renderer/components/EvalPlot.vue index 2d5a47a0..1a6857a4 100644 --- a/src/renderer/components/EvalPlot.vue +++ b/src/renderer/components/EvalPlot.vue @@ -187,6 +187,10 @@ export default { created () { document.addEventListener('resetPlot', () => { this.break = true + this.clear() + }) + document.addEventListener('stopPlot', () => { + this.break = true }) document.addEventListener('startEval', () => { this.evaluateHistory() diff --git a/src/renderer/components/EvalPlotButton.vue b/src/renderer/components/EvalPlotButton.vue index 19c6f9fe..33940b31 100644 --- a/src/renderer/components/EvalPlotButton.vue +++ b/src/renderer/components/EvalPlotButton.vue @@ -64,7 +64,7 @@ export default { }, stopEval () { this.running = false - document.dispatchEvent(new Event('resetPlot')) + document.dispatchEvent(new Event('stopPlot')) } } }