♻️ better types system

This commit is contained in:
2019-01-22 12:52:22 +01:00
parent 6394f2a869
commit abd29d2999
27 changed files with 635 additions and 300 deletions

View File

@@ -22,6 +22,7 @@
:selectedOutput="selectedOutput"
@outputSelected="selectedOutput = $event"
@inputSelected="selectedInput = $event"
@removeNode="removeNode"
/>
</Draggable>
<ContextMenu
@@ -140,6 +141,11 @@ export default {
node: new node(),
});
this.contextMenuPosition = null;
},
removeNode(nodeToRemove) {
const index = this.graph.findIndex(({node}) => node === nodeToRemove);
console.log('nodeIndex', index);
this.graph.splice(index, 1);
}
},
computed: {