From 3c1578420d1980ef13542724a11bf90783885c14 Mon Sep 17 00:00:00 2001 From: Natanael Arndt Date: Tue, 18 Aug 2020 22:16:22 +0200 Subject: [PATCH] Add posibility to configure ports --- src/components/Diagram.vue | 5 +++++ src/components/DiagramPort.vue | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/Diagram.vue b/src/components/Diagram.vue index d462d0a..2958827 100644 --- a/src/components/Diagram.vue +++ b/src/components/Diagram.vue @@ -84,6 +84,7 @@ @onStartDragNewLink="startDragNewLink" @mouseUpPort="mouseUpPort" @delete="model.removePort(node, port)" + @configure="configurePort(node, port)" /> @@ -354,6 +355,10 @@ export default { onDropNode(evt, node) { this.$emit("dropNode", evt, node); + }, + + configurePort(node, port) { + this.$emit("configurePort", node, port); } }, computed: { diff --git a/src/components/DiagramPort.vue b/src/components/DiagramPort.vue index 3934780..3a1a63f 100644 --- a/src/components/DiagramPort.vue +++ b/src/components/DiagramPort.vue @@ -9,7 +9,7 @@ width="10" height="10" @mouseenter="enter" @mouseleave="leave" @mousedown="startDragNewLink" @mouseup="mouseup"> - {{name}} + {{name}} - {{name}} + {{name}} + o + x @@ -50,6 +52,9 @@ export default { }, deletePort: function() { this.$emit("delete"); + }, + configurePort: function() { + this.$emit("configure"); } } };