From 7c456731682c2981076117f77fa64f92e4ac696d Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Tue, 14 Apr 2020 21:07:54 +0200 Subject: [PATCH] Fix broken chart after resize --- js/src/chartviewmodel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/src/chartviewmodel.js b/js/src/chartviewmodel.js index 0070dee..b8d2d22 100644 --- a/js/src/chartviewmodel.js +++ b/js/src/chartviewmodel.js @@ -130,7 +130,9 @@ export default class ChartViewModel extends ViewModel { this.model.chartVisible = !this.model.chartVisible; }; this.model.onMenuToggle = () => { - this.chart.update(); + if (this.model.chartVisible) { + this.chart.update(); + } }; }