               .append('g')
               .attr("class","drawarea")
               .attr('transform', 'translate(0,10)')
-    d3.select('svg').call d3.behavior.zoom().scaleExtent([
-      0.5
-      5
-    ]).on('zoom', zoom)
+    d3.select('svg').call @zoom
+
 
   getNeurons: ->
     d3.json @path, @gotNeurons

  path: null
  width: null
  height: null

  constructor: (@selector) ->
    @$node = $(@selector)
    @path = @$node.data("source")
    @width = @$node.width()
    @height = @width
    @createD3Elements()
    @drawSVG()
    @getNeurons()

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