 
     @highlightLines()
 
-  connect:(source, target)->
-    return  unless source and target
-    return  if source.dia?.id is target.dia?.id
-
-    if not @allowedToConnect source, target
-      return warn """Connection from #{source.dia.constructor.name}
-                     to #{target.dia.constructor.name} is not allowed!"""
-
-    @connections.push {source, target}
-    @highlightLines target.dia
-
-  allowedToConnect:(source, target)->
+  allowedToConnect = (source, target)->
+
+    return no  unless source and target
+    return no  if source.dia?.id is target.dia?.id
+
     for i in [0..1]
       if source.dia.allowedConnections? and \
          Object.keys(source.dia.allowedConnections).length > 0

            joint = conn.dia.joints[conn.joint]
            if joint not in @activeJoints
              joint.showDeleteButton()
              joint.on 'DeleteRequested', @bound 'disconnectHelper'
              @activeJoints.push joint

  handleLineRequest:(joint)->
    @_trackJoint = joint

  # Needs refactoring ~ GG
  disconnectHelper:(dia, joint)->
    return  if @activeDias.length isnt 1

    isEqual = (connection)=>
      (dia is connection.dia) and (joint is connection.joint)

    activeDia = @activeDias.first
    connectionsToDelete = []
    for conn in @connections
      if ((isEqual conn.source) or (isEqual conn.target)) and \
         ((conn.source.dia is activeDia) or (conn.target.dia is activeDia))
        connectionsToDelete.push conn

    @connections = (c for c in @connections when c not in connectionsToDelete)
    @highlightLines @activeDias

  disconnect:(dia)->

    newConnections = []
    for connection in @connections

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

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