Skip to content

Commit 664edd3

Browse files
committed
update zscaling from node_modules
1 parent 9bb4b19 commit 664edd3

File tree

1 file changed

+45
-31
lines changed

1 file changed

+45
-31
lines changed

components/ZScaling.vue

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,55 @@
11
<template>
2-
<v-sheet :width="width + 'px'" class="z-scaling-menu" border="md">
3-
<v-card class="bg-primary pa-0">
4-
<v-card-title>
5-
<h3 class="mt-4">Z Scaling Control</h3>
2+
<v-sheet
3+
:width="width + 'px'"
4+
class="z-scaling-menu"
5+
elevation="10"
6+
rounded="lg"
7+
>
8+
<v-card class="bg-primary pa-4" elevation="0">
9+
<v-card-title class="d-flex justify-space-between align-center">
10+
<h3 class="text-h5 font-weight-bold">Z Scaling Control</h3>
611
</v-card-title>
7-
<v-card-text class="pa-0">
12+
<v-card-text class="pt-4">
813
<v-container>
914
<v-row>
10-
<v-col cols="12" class="py-0">
15+
<v-col cols="12" class="py-2">
1116
<v-slider
1217
v-model="zScale"
1318
:min="0.1"
1419
:max="10"
1520
:step="0.2"
1621
label="Z Scale"
1722
thumb-label
23+
color="white"
24+
track-color="white"
1825
></v-slider>
1926
</v-col>
2027
</v-row>
2128
<v-row>
22-
<v-col cols="12" class="py-0">
29+
<v-col cols="12" class="py-2">
2330
<v-text-field
24-
v-model="zScale"
31+
v-model.number="zScale"
2532
type="number"
2633
label="Z Scale Value"
34+
outlined
35+
dense
36+
hide-details
37+
step="0.1"
38+
class="custom-number-input"
2739
></v-text-field>
2840
</v-col>
2941
</v-row>
3042
</v-container>
3143
</v-card-text>
32-
<v-card-actions justify-center>
33-
<v-btn
34-
variant="outlined"
35-
color="white"
36-
text
37-
@click="emit('close')"
38-
class="ml-8 mb-4"
39-
>
44+
<v-card-actions class="justify-center pb-4">
45+
<v-btn variant="text" color="white" @click="emit('close')" class="px-4">
4046
Close
4147
</v-btn>
4248
<v-btn
4349
variant="outlined"
44-
class="mb-4"
4550
color="white"
46-
text
4751
@click="updateZScaling"
52+
class="px-4"
4853
>
4954
Apply
5055
</v-btn>
@@ -54,26 +59,23 @@
5459
</template>
5560

5661
<script setup>
57-
import viewer_schemas from "@geode/opengeodeweb-viewer/schemas.json"
58-
62+
const hybridViewerStore = useHybridViewerStore()
5963
const emit = defineEmits(["close"])
60-
6164
const props = defineProps({
6265
width: { type: Number, required: false, default: 400 },
6366
})
6467
65-
const zScale = ref(1.0)
68+
const zScale = ref(hybridViewerStore.zScale)
6669
67-
async function updateZScaling() {
68-
const schema = viewer_schemas?.opengeodeweb_viewer?.viewer?.set_z_scaling
69-
console.log("schema", schema, "z_scale", zScale.value)
70-
await viewer_call({
71-
schema,
72-
params: {
73-
z_scale: zScale.value,
74-
},
75-
})
70+
watch(
71+
() => hybridViewerStore.zScale,
72+
(newVal) => {
73+
zScale.value = newVal
74+
},
75+
)
7676
77+
async function updateZScaling() {
78+
await hybridViewerStore.setZScaling(zScale.value)
7779
emit("close")
7880
}
7981
</script>
@@ -84,5 +86,17 @@
8486
z-index: 2;
8587
top: 90px;
8688
right: 55px;
89+
border-radius: 12px !important;
90+
}
91+
92+
.custom-number-input :deep(.v-input__control) {
93+
min-height: 48px;
94+
}
95+
96+
.v-btn {
97+
border-radius: 8px;
98+
text-transform: none;
99+
font-weight: 500;
100+
letter-spacing: normal;
87101
}
88102
</style>

0 commit comments

Comments
 (0)