add field settings dropdown to area

This commit is contained in:
Pete Matsyburka
2024-05-05 16:57:04 +03:00
parent ace897eaf9
commit a0f4916d3b
5 changed files with 541 additions and 359 deletions
+4 -1
View File
@@ -17,6 +17,7 @@
:image="image"
@drop-field="$emit('drop-field', {...$event, attachment_uuid: document.uuid })"
@remove-area="$emit('remove-area', $event)"
@scroll-to="scrollToArea"
@draw="$emit('draw', {...$event, attachment_uuid: document.uuid })"
/>
</div>
@@ -125,7 +126,9 @@ export default {
},
methods: {
scrollToArea (area) {
this.pageRefs[area.page].areaRefs.find((e) => e.area === area).$el.scrollIntoView({ behavior: 'smooth', block: 'center' })
this.$nextTick(() => {
this.pageRefs[area.page].areaRefs.find((e) => e.area === area).$el.scrollIntoView({ behavior: 'smooth', block: 'center' })
})
},
setPageRefs (el) {
if (el) {