From 46ef02b54d1fbeb4206c9c5cd15cb292a6376dbd Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 19 Nov 2024 10:33:39 +0100 Subject: [PATCH] deactivate drag mode when widget config modal is opened --- public/js/components/Dashboard/Item.js | 12 ++++++++++-- public/js/components/Dashboard/Section.js | 13 +++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/public/js/components/Dashboard/Item.js b/public/js/components/Dashboard/Item.js index 31b8a5085..deb55ed2b 100644 --- a/public/js/components/Dashboard/Item.js +++ b/public/js/components/Dashboard/Item.js @@ -19,7 +19,9 @@ export default { "change", "remove", "dragstart", - "resizestart" + "resizestart", + "configOpened", + "configClosed" ], props: [ "id", @@ -41,6 +43,12 @@ export default { }, }, methods: { + handleShowBsModal() { + this.$emit('configOpened') + }, + handleHideBsModal() { + this.$emit('configClosed') + }, mouseDown(e) { this.target = e.target; }, @@ -120,7 +128,7 @@ export default {
- + diff --git a/public/js/components/Dashboard/Section.js b/public/js/components/Dashboard/Section.js index c6769a373..3fbc40af6 100644 --- a/public/js/components/Dashboard/Section.js +++ b/public/js/components/Dashboard/Section.js @@ -26,6 +26,7 @@ export default { ], data() { return { + configOpened: false, gridWidth: 1, gridHeight: null, editMode: this.adminMode @@ -91,6 +92,12 @@ export default { }, }, methods: { + handleConfigOpened() { + this.configOpened = true + }, + handleConfigClosed() { + this.configOpened = false + }, checkResizeLimit(item, w, h) { // NOTE(chris): widgets needs to be loaded for this to work let widget = CachedWidgetLoader.getWidget(item.widget); @@ -180,7 +187,7 @@ export default { {{$p.t('ui/section' + name)}} - +