Skip to content

Commit efaabc4

Browse files
committed
Clear IIP if a connection is made to that port, refs meemoo/dataflow#72
1 parent 05ee53d commit efaabc4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/plugins/nofloGraph.coffee

+7
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ class NoFloGraphPlugin
145145
graph.nofloGraph.removeInitial node.nofloNode.id, port
146146

147147
subscribeDataflowEdge: (edge, graph) ->
148+
# Ensure there is no IIP left behind when we make a connection to the port
149+
for iip in graph.nofloGraph.initializers
150+
continue unless iip
151+
if iip.to.node is edge.target.parentNode.nofloNode.id and iip.to.port is edge.target.id
152+
graph.nofloGraph.removeInitial edge.target.parentNode.nofloNode.id, edge.target.id
153+
154+
# Create edge as needed
148155
unless edge.nofloEdge
149156
nofloEdge = graph.nofloGraph.addEdge edge.source.parentNode.nofloNode.id, edge.source.id, edge.target.parentNode.nofloNode.id, edge.target.id,
150157
route: edge.get 'route'

0 commit comments

Comments
 (0)