     @context.strokeStyle = '#cccccc'
     @context.beginPath()
     @data_relations_visibles.forEach (link) =>
-      @context.moveTo link.source.x|0, link.source.y|0
-      @context.lineTo link.target.x|0, link.target.y|0
+      if link.direction
+        @drawRelationArrow link.source, link.target
+      else
+        @drawRelation link.source, link.target
     @context.stroke()
     @context.closePath()
 

    @data_relations_visibles.forEach (link) =>
      @context.strokeStyle = link.color
      @context.beginPath()
      @context.moveTo link.source.x|0, link.source.y|0
      @context.lineTo link.target.x|0, link.target.y|0
      @context.stroke()
      @context.closePath()

  drawRelationsLabels: ->
    @context.textBaseline = 'bottom'


  TWO_PI:          2*Math.PI
  HALF_PI:         Math.PI*0.5
  SIXTH_PI:        Math.PI/6
  LABEL_MAX_WIDTH: 130
  context:         null
  quadtree:        null
