Skip to content

Commit f29b899

Browse files
committed
feat(Z_Scaling_Card): Card and logic to scale the Z Axis
1 parent 73a1233 commit f29b899

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

components/ZScaling.vue

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<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>
6+
</v-card-title>
7+
<v-card-text class="pa-0">
8+
<v-container>
9+
<v-row>
10+
<v-col cols="12" class="py-0">
11+
<v-slider
12+
v-model="zScale"
13+
:min="0.1"
14+
:max="10"
15+
:step="0.2"
16+
label="Z Scale"
17+
thumb-label
18+
></v-slider>
19+
</v-col>
20+
</v-row>
21+
<v-row>
22+
<v-col cols="12" class="py-0">
23+
<v-text-field
24+
v-model="zScale"
25+
type="number"
26+
label="Z Scale Value"
27+
></v-text-field>
28+
</v-col>
29+
</v-row>
30+
</v-container>
31+
</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+
>
40+
Close
41+
</v-btn>
42+
<v-btn
43+
variant="outlined"
44+
class="mb-4"
45+
color="white"
46+
text
47+
@click="updateZScaling"
48+
>
49+
Apply
50+
</v-btn>
51+
</v-card-actions>
52+
</v-card>
53+
</v-sheet>
54+
</template>
55+
56+
<script setup>
57+
import viewer_schemas from "@geode/opengeodeweb-viewer/schemas.json"
58+
59+
const emit = defineEmits(["close"])
60+
61+
const props = defineProps({
62+
width: { type: Number, required: false, default: 400 },
63+
})
64+
65+
const zScale = ref(1.0)
66+
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+
})
76+
77+
emit("close")
78+
}
79+
</script>
80+
81+
<style scoped>
82+
.z-scaling-menu {
83+
position: absolute;
84+
z-index: 2;
85+
top: 90px;
86+
right: 55px;
87+
}
88+
</style>

0 commit comments

Comments
 (0)