From f254196c3cdc09d632a5ac8338b88e27f783eaf9 Mon Sep 17 00:00:00 2001 From: Arturo Manzoli Date: Tue, 1 Oct 2024 11:09:23 -0300 Subject: [PATCH] Components: Edit-menu: Make regular widgets also draggable Signed-off-by: Arturo Manzoli --- src/components/EditMenu.vue | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/components/EditMenu.vue b/src/components/EditMenu.vue index 7b3a47b9b..5366d2813 100644 --- a/src/components/EditMenu.vue +++ b/src/components/EditMenu.vue @@ -463,8 +463,11 @@
To be placed on the main view area
-
- (Click on card to add) +
+ Click or drag to add
To be placed on the top and bottom bars @@ -484,12 +487,11 @@ v-for="widgetType in availableWidgetTypes" :key="widgetType" class="flex flex-col items-center justify-between rounded-md bg-[#273842] hover:brightness-125 h-[90%] aspect-square cursor-pointer elevation-4" - @click="store.addWidget(widgetType, store.currentView)" + draggable="true" + @dragstart="onRegularWidgetDragStart" + @dragend="onRegularWidgetDragEnd(widgetType)" > -
- -
- +