Pasting and duplicating nodes (#902)

* Pasting and duplicating nodes

* Rebind duplication

* Update selection on duplicate
This commit is contained in:
0HyperCube
2022-12-22 21:47:48 +00:00
committed by Keavon Chambers
parent 8f4f7b3cf1
commit af001f8db6
8 changed files with 119 additions and 2 deletions
+5 -1
View File
@@ -300,7 +300,7 @@ import { defineComponent, nextTick } from "vue";
import type { IconName } from "@/utility-functions/icons";
import type { FrontendNodeLink } from "@/wasm-communication/messages";
import { UpdateNodeGraphSelection, FrontendNodeLink } from "@/wasm-communication/messages";
import LayoutCol from "@/components/layout/LayoutCol.vue";
import LayoutRow from "@/components/layout/LayoutRow.vue";
@@ -721,6 +721,10 @@ export default defineComponent({
const outputPort2 = document.querySelectorAll(`[data-port="output"]`)[6] as HTMLDivElement | undefined;
const inputPort2 = document.querySelectorAll(`[data-port="input"]`)[3] as HTMLDivElement | undefined;
if (outputPort2 && inputPort2) this.createWirePath(outputPort2, inputPort2.getBoundingClientRect(), true, false);
this.editor.subscriptions.subscribeJsMessage(UpdateNodeGraphSelection, (updateNodeGraphSelection) => {
this.selected = updateNodeGraphSelection.selected;
});
},
components: {
IconLabel,