Skip to content

Commit

Permalink
Split screen vertically for time series tables
Browse files Browse the repository at this point in the history
  • Loading branch information
ceesvoesenek committed Jun 24, 2024
1 parent 3067590 commit 55e047e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
35 changes: 30 additions & 5 deletions src/components/spatialdisplay/SpatialDisplay.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
<template>
<div class="container">
<div class="child-container" :class="{ 'd-none': hideMap }">
<div
class="container"
:class="{ 'vertical-split': route.meta.useVerticalSplit }"
>
<div
class="child-container"
:class="{
'd-none': hideMap,
'vertical-split': route.meta.useVerticalSplit,
}"
>
<SpatialDisplayComponent
:layer-name="props.layerName"
:location-id="props.locationId"
Expand All @@ -16,7 +25,11 @@
@coordinate-click="onCoordinateClick"
></SpatialDisplayComponent>
</div>
<div v-if="filter" class="child-container">
<div
v-if="filter"
class="child-container"
:class="{ 'vertical-split': route.meta.useVerticalSplit }"
>
<router-view
@close="closeTimeSeriesDisplay"
:filter="filter"
Expand Down Expand Up @@ -275,17 +288,29 @@ watch(
height: 100%;
}
.container.vertical-split {
flex-direction: column;
}
.child-container {
position: relative;
display: flex;
flex-direction: column;
width: 50%;
max-width: 100%;
flex: 1 1 0px;
}
.child-container.mobile {
height: 100%;
width: 100%;
}
.child-container:not(.vertical-split) {
width: 50%;
max-width: 100%;
}
.child-container.vertical-split {
height: 50%;
max-height: 100%;
}
</style>
2 changes: 1 addition & 1 deletion src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const dynamicRoutes: Readonly<RouteRecordRaw[]> = [
name: 'SpatialTableDisplay',
component: SpatialTableDisplay,
props: true,
meta: { sidebar: true },
meta: { sidebar: true, useVerticalSplit: true },
},
],
},
Expand Down

0 comments on commit 55e047e

Please sign in to comment.