Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions components/ZScaling.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<template>
<v-sheet :width="width + 'px'" class="z-scaling-menu" border="md">
<v-card class="bg-primary pa-0">
<v-card-title>
<h3 class="mt-4">Z Scaling Control</h3>
</v-card-title>
<v-card-text class="pa-0">
<v-container>
<v-row>
<v-col cols="12" class="py-0">
<v-slider
v-model="zScale"
:min="0.1"
:max="10"
:step="0.2"
label="Z Scale"
thumb-label
></v-slider>
</v-col>
</v-row>
<v-row>
<v-col cols="12" class="py-0">
<v-text-field
v-model="zScale"
type="number"
label="Z Scale Value"
></v-text-field>
</v-col>
</v-row>
</v-container>
</v-card-text>
<v-card-actions justify-center>
<v-btn
variant="outlined"
color="white"
text
@click="emit('close')"
class="ml-8 mb-4"
>
Close
</v-btn>
<v-btn
variant="outlined"
class="mb-4"
color="white"
text
@click="updateZScaling"
>
Apply
</v-btn>
</v-card-actions>
</v-card>
</v-sheet>
</template>

<script setup>
import viewer_schemas from "@geode/opengeodeweb-viewer/schemas.json"

const emit = defineEmits(["close"])

const props = defineProps({
width: { type: Number, required: false, default: 400 },
})

const zScale = ref(1.0)

async function updateZScaling() {
const schema = viewer_schemas?.opengeodeweb_viewer?.viewer?.set_z_scaling
console.log("schema", schema, "z_scale", zScale.value)
await viewer_call({
schema,
params: {
z_scale: zScale.value,
},
})

emit("close")
}
</script>

<style scoped>
.z-scaling-menu {
position: absolute;
z-index: 2;
top: 90px;
right: 55px;
}
</style>
4 changes: 2 additions & 2 deletions test/components/FeedBack/ErrorsBanner.nuxt.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const vuetify = createVuetify({
})

describe("FeedBackErrorBanner.vue", async () => {
test(`Test reload`, async () => {
;(test(`Test reload`, async () => {
const wrapper = mount(FeedBackErrorBanner, {
global: {
plugins: [createTestingPinia(), vuetify],
Expand Down Expand Up @@ -48,5 +48,5 @@ describe("FeedBackErrorBanner.vue", async () => {
const v_btn = wrapper.findAll(".v-btn")
await v_btn[1].trigger("click")
expect(feedback_store.server_error).toBe(false)
})
}))
})
Loading