 
   createD3Elements: ->
     @tree = d3.layout.tree().size([@width, @height-20])
-
-  drawSVG: ->
+                            .nodeSize([100, 70])
+
+  setZoom: ->
+    @zoom = d3.behavior.zoom().scaleExtent([0.0001,3])
+                              .center([100, 100])
+                              .on('zoom', zoom)
+
+  drawSVG: =>
     @svg = d3.select(@selector)
               .append("svg")
               .attr("width", @width)

  zoom = ->
    $('.popover').hide()
    @m = [40, 240, 40, 240]
    @realWidth = window.innerWidth
    @realHeight = window.innerHeight
    @w = @realWidth - @m[0] - @m[0]
    @h = @realHeight - @m[0] - @m[2]
    scale = d3.event.scale

              .append('g')
              .attr("class","drawarea")
              .attr('transform', 'translate(0,10)')
    d3.select('svg').call @zoom


  getNeurons: ->
    d3.json @path, @gotNeurons
