         e.preventDefault()
         @panHorizontal(-20)
       # up
-      when 38 
-        e.preventDefault()
-        @panVertical(-20) 
+      when 38
+        e.preventDefault()
+        @panVertical(-20)
       # right
-      when 39 
-        e.preventDefault()
-        @panHorizontal(20) 
+      when 39
+        e.preventDefault()
+        @panHorizontal(20)
       # down
-      when 40 
-        e.preventDefault()
-        @panVertical(20) 
-      # zoom out
-      when 187
+      when 40
+        e.preventDefault()
+        @panVertical(20)
+      # zoom out - Chrome(187), Firefox(61)
+      when 187, 61
         e.preventDefault()
         @setState zooming: true
-        @zoom(.9) 
-      # zoom in 
-      when 189
+        @zoom(.9)
+      # zoom in - Chrome(189), Firefox(173)
+      when 189, 173
         e.preventDefault()
         @setState zooming: true
-        @zoom(1.1) 
-      # zooming by mousewheel
+        @zoom(1.1)
+      # zooming by wheel
       when 1
         e.preventDefault()
+        @setState zooming: true
         if e.deltaY > 0 then @zoom(.9) else @zoom(1.1)
 
   panHorizontal:(direction) ->
-    maximumX = (@state.frameDimensions.width - @state.viewBoxDimensions.width) + 20
-    minumumX = -20
+    maximumX = (@state.frameDimensions.width - @state.viewBoxDimensions.width) + (@state.frameDimensions.width * 0.6)
+    minumumX = -(@state.frameDimensions.width * 0.6)
     changedX = @state.viewBoxDimensions.x + direction
     @setState
       viewBoxDimensions:

  zoomReset: ->
    @setState
      viewBoxDimensions:
        width: @state.frameDimensions.width, 
        height: @state.frameDimensions.height,
        x: 0,
        y: 0

        height: @state.viewBoxDimensions.height

  panVertical:(direction)->
    maximumY = (@state.frameDimensions.height - @state.viewBoxDimensions.height) + (@state.frameDimensions.height * 0.6)
    minimumY = -(@state.frameDimensions.height * 0.6)
    changedY = @state.viewBoxDimensions.y + direction
    @setState
      viewBoxDimensions:
        x: @state.viewBoxDimensions.x
        y: Math.max(minimumY, Math.min(changedY, maximumY))
        width: @state.viewBoxDimensions.width
        height: @state.viewBoxDimensions.height
