Skip to content

Commit

Permalink
Clear IIP if a connection is made to that port, refs meemoo/dataflow#72
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 2, 2013
1 parent 05ee53d commit efaabc4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/nofloGraph.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ class NoFloGraphPlugin
graph.nofloGraph.removeInitial node.nofloNode.id, port

subscribeDataflowEdge: (edge, graph) ->
# Ensure there is no IIP left behind when we make a connection to the port
for iip in graph.nofloGraph.initializers
continue unless iip
if iip.to.node is edge.target.parentNode.nofloNode.id and iip.to.port is edge.target.id
graph.nofloGraph.removeInitial edge.target.parentNode.nofloNode.id, edge.target.id

# Create edge as needed
unless edge.nofloEdge
nofloEdge = graph.nofloGraph.addEdge edge.source.parentNode.nofloNode.id, edge.source.id, edge.target.parentNode.nofloNode.id, edge.target.id,
route: edge.get 'route'
Expand Down

0 comments on commit efaabc4

Please sign in to comment.