From 17c2119efb84f17af77f2ad13e88865265cb17ad Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Thu, 15 Aug 2024 20:11:42 +0200 Subject: [PATCH] Charts: Apply iOS-related fixes only to iOS devices (#2717) Improves the fixes from #2677, #2511, #2706 and #2710 to only apply to iOS devices. Avoids/Fixes regressions with other platforms such as https://community.openhab.org/t/chart-scrollbar/157828. Known issues: - Charts display in popups on iPads are rendered to large. Signed-off-by: Florian Hotze --- .../widgets/chart/oh-chart-page.vue | 21 +++++++++++++------ .../web/src/pages/analyzer/analyzer.vue | 3 --- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/bundles/org.openhab.ui/web/src/components/widgets/chart/oh-chart-page.vue b/bundles/org.openhab.ui/web/src/components/widgets/chart/oh-chart-page.vue index ee2a96e77..8413ca860 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/chart/oh-chart-page.vue +++ b/bundles/org.openhab.ui/web/src/components/widgets/chart/oh-chart-page.vue @@ -13,13 +13,18 @@ overflow hidden top calc(var(--f7-safe-area-top) + var(--f7-navbar-height)) width 100% - height calc(100dvh - var(--f7-safe-area-top) - var(--f7-navbar-height)) !important + --oh-chart-page-height calc(100% - var(--f7-safe-area-top) - var(--f7-safe-area-bottom) - var(--f7-navbar-height)) + height var(--oh-chart-page-height) !important &.with-tabbar - height calc(100dvh - var(--f7-safe-area-top) - var(--f7-safe-area-bottom) - var(--f7-navbar-height) - var(--f7-tabbar-labels-height)) !important + height calc(var(--oh-chart-page-height) - var(--f7-tabbar-labels-height)) !important &.with-toolbar - height calc(100dvh - var(--f7-safe-area-top) - var(--f7-safe-area-bottom) - var(--f7-navbar-height) - var(--f7-toolbar-height)) !important + height calc(var(--oh-chart-page-height) - var(--f7-toolbar-height)) !important &.sheet-opened - height calc(100dvh - var(--f7-safe-area-top) - var(--f7-safe-area-bottom) - var(--f7-navbar-height) - var(--f7-sheet-height)) !important + height calc(var(--oh-chart-page-height) - var(--f7-sheet-height)) !important + +.device-ios /* fix chart rendering issues on iOS >= 17.4 */ + .oh-chart-page-chart + --oh-chart-page-height calc(100dvh - var(--f7-safe-area-top) - var(--f7-safe-area-bottom) - var(--f7-navbar-height)) /* use dvh because with % the height is calculated to 0px and ECharts fails to render */ diff --git a/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue b/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue index e8907e99e..618125fb5 100644 --- a/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue +++ b/bundles/org.openhab.ui/web/src/pages/analyzer/analyzer.vue @@ -235,9 +235,6 @@ --f7-theme-color-rgb var(--f7-color-blue-rgb) --f7-theme-color-tint var(--f7-color-blue-tint) z-index 11000 -.analyzer-content - .analyzer-chart - position fixed !important .md .analyzer-controls .toolbar .link width 28%