100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Fix rendering map in dialogs for WebKit based browsers (#2407)
Koene15f977ec578
diff --git a/ui/app/manager/src/pages/page-map.ts b/ui/app/manager/src/pages/page-map.tsindex 849f174c1..de7d49087 100644--- a/ui/app/manager/src/pages/page-map.ts+++ b/ui/app/manager/src/pages/page-map.ts@@ -137,6 +137,10 @@ export class PageMap extends Page<MapStateKeyed> {static get styles() {// language=CSSreturn css`+ :host {+ display: flex;+ }+or-map-asset-card {height: 35vh;position: absolute;@@ -154,13 +158,11 @@ export class PageMap extends Page<MapStateKeyed> {margin: 10px 0;z-index: 1;}-+or-map {- display: block;- height: 100%;- width: 100%;+ flex: 1 1 auto;}-+@media only screen and (min-width: 40em){or-map-asset-card {position: absolute;diff --git a/ui/component/or-map/src/style.ts b/ui/component/or-map/src/style.tsindex a89adea3f..07149d3ed 100644--- a/ui/component/or-map/src/style.ts+++ b/ui/component/or-map/src/style.ts@@ -29,13 +29,12 @@ export const style = css`--internal-or-map-marker-icon-active-width: var(--or-map-marker-icon-active-width, 24px);--internal-or-map-marker-icon-active-height: var(--or-map-marker-icon-active-height, 24px);--internal-or-map-marker-icon-active-transform: var(--or-map-marker-icon-active-transform, translate(-50%, -20px));- display: block;+ display: flex;overflow: hidden;-min-height: var(--internal-or-map-min-height);width: var(--internal-or-map-width);}-+canvas {outline: none !important;}@@ -47,13 +46,17 @@ export const style = css`slot {display: none;}-+#container {position: relative;- width: 100%;- height: 100%;+ /*+ * Setting height/width through percentages doesn't work for WebKit browsers as the parent+ * element's height property resolves to 0 when it's the :host element of a web components'+ * shadow-dom.+ */+ flex: 1 1 auto;}-+#map {position: absolute;left: 0;