Skip to content

Commit d774348

Browse files
feat(screenshot): hardcoded component position
1 parent 0fd31e7 commit d774348

File tree

2 files changed

+4
-35
lines changed

2 files changed

+4
-35
lines changed

components/Screenshot.vue

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,9 @@
6868
6969
const props = defineProps({
7070
show_dialog: { type: Boolean, required: true },
71-
offset_top: { type: Number, required: true },
72-
offset_left: { type: Number, required: true },
7371
width: { type: Number, required: false, default: 400 },
7472
})
7573
76-
console.log("props", props)
77-
7874
const output_extensions =
7975
viewer_schemas.opengeodeweb_viewer.take_screenshot.properties
8076
.output_extension.enum
@@ -109,28 +105,13 @@
109105
include_background.value = true
110106
}
111107
})
112-
113-
const top = computed(() => {
114-
console.log("props.offset_top", props.offset_top)
115-
116-
return props.offset_top + "px"
117-
})
118-
const right = computed(() => {
119-
console.log("props.offset_left", props.offset_left)
120-
console.log("props.width", props.width)
121-
122-
return "200px" // Change this value to adjust the position relative to the mdi-camera icon
123-
})
124-
125-
console.log("top", top)
126-
console.log("left", left)
127108
</script>
128109

129110
<style scoped>
130111
.screenshot_menu {
131112
position: absolute;
132113
z-index: 2;
133-
right: v-bind("right");
134-
top: v-bind("top");
114+
top: 90px;
115+
right: 55px;
135116
}
136117
</style>

components/ViewToolbar.vue

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,12 @@
1717
</v-col>
1818
</v-row>
1919
</v-container>
20-
<Screenshot
21-
:show_dialog="take_screenshot"
22-
:offset_top="offset_top"
23-
:offset_left="offset_left"
24-
@close="take_screenshot = false"
25-
/>
20+
<Screenshot :show_dialog="take_screenshot" @close="take_screenshot = false" />
2621
</template>
2722

2823
<script setup>
2924
import schemas from "@geode/opengeodeweb-viewer/schemas.json"
3025
31-
const offset_top = ref(0)
32-
const offset_left = ref(0)
33-
3426
const take_screenshot = ref(false)
3527
3628
const camera_options = [
@@ -46,11 +38,7 @@
4638
{
4739
tooltip: "Take a screenshot",
4840
icon: "mdi-camera",
49-
action: (event) => {
50-
console.log("event", event)
51-
offset_top.value = event.y
52-
offset_left.value = event.x
53-
console.log("offset", offset_top.value, offset_left.value)
41+
action: () => {
5442
take_screenshot.value = !take_screenshot.value
5543
},
5644
},

0 commit comments

Comments
 (0)