     update()
 
 
+
+    if selectedNode?
+      if nodes.nodeById(d3.select(selectedNode).datum()[conf.nodeIdAttr])?
+        showFlowsOf(selectedNode)
+        
+      else        
+        # selected node does not have any flows
+        flows.selectAll("line").remove()
+
+
     clearNodeSelection = ->
-      if selectedNode != null
+      if selectedNode?
         d3.select(selectedNode).selectAll("circle").classed("selected", false)
         flows.selectAll("line").remove()
         selectedNode = null
 
-    $(document).keyup (e) -> if e.keyCode == 27 then clearNodeSelection()
-
-    $('g.bubble').tipsy
-      gravity: 'w'
-      html: true
-      opacity: 0.9
-      trigger: "manual"
-      title: ->
-        bubbleTooltip(d3.select(this).data()[0])
+
+    unless isUpdate
+
+      $(document).keyup (e) -> if e.keyCode == 27 then clearNodeSelection()
+
+      $('g.bubble').tipsy
+        gravity: 'w'
+        html: true
+        opacity: 0.9
+        trigger: "manual"
+        title: -> bubbleTooltip(d3.select(this).data()[0])
 
 
     ###


  showFlowsOf = (bbl) ->
    flows = svg.selectAll("g.flows")
    d = d3.select(bbl).datum() #data()?[0]
    ###
    ffwscale = d3.scale.linear()
      .range([0, rscale.range()[1]/2])

    flows = svg.selectAll("g.flows")




    bubble = svg.selectAll("g.bubble")
