Skip to content

Commit d90141d

Browse files
committed
initial netcdfMerge layer scripting
1 parent cdb05d7 commit d90141d

13 files changed

Lines changed: 514 additions & 24 deletions

File tree

client/src/components/DataSelection/Datasets.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,18 @@ export default defineComponent({
175175
</template>
176176
</v-tooltip>
177177
</div>
178-
<v-list>
178+
<v-list class="pa-0">
179179
<v-list-group
180180
v-for="dataset in datasets"
181181
:key="`${dataset.id}_${dataset.modified}`"
182182
:value="`dataset:${dataset.id}`"
183-
class="list-group"
183+
class="list-group pa-0"
184184
>
185185
<template #activator="{ props, isOpen }">
186186
<v-list-item
187187
v-bind="props"
188188
:title="dataset.name"
189+
class="pa-0"
189190
@click="!isOpen && loadDataset(dataset)"
190191
>
191192
<v-tooltip
@@ -242,6 +243,7 @@ export default defineComponent({
242243
<v-list-item
243244
v-for="layer in layersByDataset[dataset.id]"
244245
:key="layer.id"
246+
class="pa-0"
245247
>
246248
<DatasetItem :layer="layer" @netcdf-deleted="updateNetCDFLayer(dataset.id)" />
247249
</v-list-item>
@@ -291,7 +293,7 @@ export default defineComponent({
291293
.list-group {
292294
/* reduce padding of nested groups */
293295
--list-indent-size: 0px;
294-
--prepend-width: 24px;
296+
--prepend-width: 8px;
295297
}
296298
297299
.layer-selection {

client/src/components/DataSelection/NetCDFDataConfigurator.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export default defineComponent({
377377

378378
<template>
379379
<v-list dense>
380-
<v-row dense align="center" justify="center" class="mx-1">
380+
<v-row dense align="center" justify="center" class="mx-1 pa-0">
381381
<v-icon v-tooltip="'NetCDF Layer'">
382382
mdi-grid
383383
</v-icon>
@@ -764,6 +764,7 @@ export default defineComponent({
764764
white-space: nowrap;
765765
overflow: hidden;
766766
text-overflow: ellipsis;
767+
max-width:210px;
767768
}
768769
.select-variable {
769770
border: 1px solid gray;

client/src/components/FeatureSelection/vectorFeatureGraphUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const renderVectorFeatureGraph = (
2828
svg.selectAll('*').remove(); // Clear previous content
2929

3030
const defaultMargin = {
31-
top: 20, right: 20, bottom: options?.xAxisVerticalLabels ? 70 : 15, left: 50,
31+
top: 20, right: 20, bottom: options?.xAxisVerticalLabels ? 70 : 35, left: 50,
3232
}; // Base left margin
3333
const width = (localContainer.clientWidth || 250) - defaultMargin.left - defaultMargin.right;
3434
const height = baseHeight - defaultMargin.top - defaultMargin.bottom;
@@ -244,7 +244,7 @@ const renderVectorFeatureGraph = (
244244
if (options?.xAxisLabel) {
245245
xaxis.append('text')
246246
.attr('x', width / 2)
247-
.attr('y', 40)
247+
.attr('y', 25)
248248
.attr('fill', 'black')
249249
.attr('text-anchor', 'middle')
250250
.text(options?.xAxisLabel);

client/src/components/LayerConfig.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export default defineComponent({
167167
</v-icon>
168168
</v-col>
169169
</v-row>
170-
<v-card v-if="expanded">
170+
<v-card v-if="visibility && expanded">
171171
<layer-representation-vue
172172
v-if="['raster', 'vector'].includes(layer.type)"
173173
:layer-id="layer.id"

client/src/components/NetCDFLayerConfig.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineComponent({
2525
});
2626
const totalIndex = computed(() => {
2727
const found = visibleNetCDFLayers.find((item) => item.netCDFLayer === props.layer.id);
28-
return found?.images.length || 0;
28+
return found?.images.length ? found.images.length - 1 : 0;
2929
});
3030
const stepMapping = computed(() => {
3131
const found = visibleNetCDFLayers.find((item) => item.netCDFLayer === props.layer.id);

client/src/components/TabularData/MapLayerTableGraph.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ export default defineComponent({
8383
xAxisIsTime: graph.xAxis === 'unix_time',
8484
onLineHover,
8585
onLineExit,
86+
xAxisLabel: graph.xAxisLabel,
87+
yAxisLabel: graph.yAxisLabel,
8688
},
8789
300,
8890
);

client/src/map/mouseEvents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ const setPopupEvents = (localMap: Map) => {
233233
clickFunc = annotationDisplayType.selectable === 'singleSelect' ? singleClick : click;
234234
localMap.on('click', `Layer_${id}_${annotationType}`, clickFunc);
235235
}
236-
if (annotationDisplayType.hoverable) {
236+
if (annotationDisplayType.hoverable || MapStore.mapLayerFeatureGraphsVisible) {
237237
localMap.on('mouseenter', `Layer_${id}_${annotationType}`, mouseenter);
238238
localMap.on('mouseleave', `Layer_${id}_${annotationType}`, mouseleave);
239239
}

client/src/views/HomePage.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export default defineComponent({
106106
hasMapLayerVectorGraphs,
107107
toggleMapLayerVectorGraphs,
108108
mapLayerVectorGraphsVisible: MapStore.mapLayerFeatureGraphsVisible,
109+
mapLayerFeatureGraphs: MapStore.mapLayerFeatureGraphs,
109110
sideBarWidth: MapStore.currentSideBarWidth,
110111
sideBarOpen: MapStore.sideBarOpen,
111112
activeSideBar: MapStore.activeSideBarCard,
@@ -259,7 +260,7 @@ export default defineComponent({
259260
<v-row dense class="fill-height">
260261
<v-col class="d-flex flex-column fill-height" style="min-height: 90vh">
261262
<MapVue />
262-
<MapLayerTableGraph v-if="mapLayerVectorGraphsVisible" />
263+
<MapLayerTableGraph v-if="mapLayerVectorGraphsVisible && mapLayerFeatureGraphs.length" />
263264
</v-col>
264265
</v-row>
265266
<selected-feature-list />

0 commit comments

Comments
 (0)