     # clear canvas
     @context.clearRect 0, 0, @viewport.width, @viewport.height
     @context.save()
-
     # translate & scale viewport
     @context.translate @viewport.center.x+@viewport.translate.x, @viewport.center.y+@viewport.translate.y
     @context.scale @viewport.scale, @viewport.scale
-    
+    # draw relations
     @drawRelations()
-    
+    # draw relations labels
     if @node_active or @node_hovered
       @drawRelationsLabels()
-    
+    # draw nodes
     @drawNodes()
-    
+    # draw nodes labels
     if @parameters.showNodesLabel or @node_active or @node_hovered
       @drawNodesLabels()
-
+    # context restore
     @context.restore()
 
   drawNodes: ->

      @context.fill()
      @context.stroke()
      @context.closePath()

  drawNodesLabels: ->
    # set styles

      @setNodeFill d
      @setNodeStroke d
      @setNodeFont d
      @setNodeLabel d
      @setNodeImage d
    # Reorder nodes data if size is dynamic (in order to add bigger nodes after small ones)
    if @parameters.nodesSize == 1
      @data_nodes.sort @sortNodes
