From ff1839dbebc68face2ed595a31deb7e78b119144 Mon Sep 17 00:00:00 2001 From: bismosa <2944275+bismosa@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:30:39 +0200 Subject: [PATCH 1/2] Update chart-data.component.js - Chart update if visible --- www/ftui/components/chart/chart-data.component.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/ftui/components/chart/chart-data.component.js b/www/ftui/components/chart/chart-data.component.js index 82f64da8..c9d7a4d2 100755 --- a/www/ftui/components/chart/chart-data.component.js +++ b/www/ftui/components/chart/chart-data.component.js @@ -64,7 +64,9 @@ export class FtuiChartData extends FtuiElement { fetch() { if (!this.isLoading) { - this.fetchLogItems(this.log, this.file, this.spec); + if (ftuiHelper.isVisible(this)){ + this.fetchLogItems(this.log, this.file, this.spec); + } } } From c31f958c86f81114e09a6abb006e3123149fbd0a Mon Sep 17 00:00:00 2001 From: bismosa <2944275+bismosa@users.noreply.github.com> Date: Mon, 17 Jun 2024 20:32:47 +0200 Subject: [PATCH 2/2] Update ftui.helper.js - Chart update if visible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit isVisible funktioniert in der ursprünglichen Version nicht bei popups --- www/ftui/modules/ftui/ftui.helper.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/ftui/modules/ftui/ftui.helper.js b/www/ftui/modules/ftui/ftui.helper.js index ccc8d065..3182dad3 100755 --- a/www/ftui/modules/ftui/ftui.helper.js +++ b/www/ftui/modules/ftui/ftui.helper.js @@ -160,7 +160,13 @@ export function isAppVisible() { } export function isVisible(element) { - return (element.offsetParent !== null); + const pop_parent = element.closest('ftui-popup'); + if (pop_parent){ + return (pop_parent.offsetParent !== null); + } else { + return (element.offsetParent !== null); + } + } export function isDefined(value) {