Sfoglia il codice sorgente

Merge branch 'AutomaApp:dev' into dev

Muhammad Zaini 2 anni fa
parent
commit
16a5da57aa

+ 7 - 4
src/components/content/selector/SelectorQuery.vue

@@ -16,7 +16,7 @@
         icon
         class="ml-2"
         title="Select a list of elements"
-        @click="$emit('update:selectList', !selectList)"
+        @click.stop.prevent="$emit('update:selectList', !selectList)"
       >
         <v-remixicon name="riListUnordered" />
       </ui-button>
@@ -29,7 +29,10 @@
         @change="$emit('selector', $event)"
       >
         <template #prepend>
-          <button class="absolute ml-2 left-0" @click="copySelector">
+          <button
+            class="absolute ml-2 left-0"
+            @click.stop.prevent="copySelector"
+          >
             <v-remixicon name="riFileCopyLine" />
           </button>
         </template>
@@ -38,11 +41,11 @@
         <button
           class="mr-1 ml-2"
           title="Parent element"
-          @click="$emit('parent')"
+          @click.stop.prevent="$emit('parent')"
         >
           <v-remixicon rotate="90" name="riArrowLeftLine" />
         </button>
-        <button title="Child element" @click="$emit('child')">
+        <button title="Child element" @click.stop.prevent="$emit('child')">
           <v-remixicon rotate="-90" name="riArrowLeftLine" />
         </button>
       </template>

+ 2 - 2
src/content/elementSelector/App.vue

@@ -36,13 +36,13 @@
         <div class="flex-grow"></div>
         <button
           class="mr-2 hoverable p-1 rounded-md transition"
-          @click.stop="state.hide = !state.hide"
+          @click.stop.prevent="state.hide = !state.hide"
         >
           <v-remixicon :name="state.hide ? 'riEyeOffLine' : 'riEyeLine'" />
         </button>
         <button
           class="hoverable p-1 rounded-md transition"
-          @click.stop="destroy"
+          @click.stop.prevent="destroy"
         >
           <v-remixicon name="riCloseLine" />
         </button>

+ 6 - 2
src/newtab/pages/workflows/[id].vue

@@ -853,8 +853,12 @@ function duplicateElements({ nodes, edges }) {
     edges || selectedEdges
   );
 
-  editor.value.removeSelectedNodes(selectedNodes);
-  editor.value.removeSelectedEdges(selectedEdges);
+  selectedNodes.forEach((node) => {
+    node.selected = false;
+  });
+  selectedEdges.forEach((edge) => {
+    edge.selected = false;
+  });
 
   editor.value.addNodes(newNodes);
   editor.value.addEdges(newEdges);