       break  if dia = container.dias[objId]
     return {dia, joint, container}
 
-  setActiveDia:(dia=[], update=yes)->
+  highlightLines:(dia=[], update=yes)->
     if not Array.isArray dia then dia = [dia]
     @activeDias = dia
-    @deselectAllDias()
+    joint.off 'DeleteRequested'      for joint in @activeJoints
+    container.emit 'UnhighlightDias' for container in @containers
+    @activeJoints = []
     @updateScene()  if update
     return  unless @activeDias.length is 1
 


  diaAdded:(container, diaObj)->
    diaObj.on "JointRequestsLine",   @bound "handleLineRequest"
    diaObj.on "DragInAction",        => @setActiveDia diaObj
    diaObj.on "RemoveMyConnections", => @disconnect diaObj

  addContainer:(container, pos = {})->

                     to #{target.dia.constructor.name} is not allowed!"""

    @connections.push {source, target}
    @highlightLines target.dia

  allowedToConnect:(source, target)->
    for i in [0..1]
