 {settings} = require '../package.json'
+
+# Guesture,
+# fires events on gestures from left and right
 module.exports =
 class Guesture
   space: 20

    right : {}
  on : {}

  constructor: (options) ->
    {@on,@space,@minActivate} = options
    @addEventListener()

  addEventListener: ->
    addEventListener = document.body.addEventListener
    addEventListener 'mousedown', (e) => @fortifyEvent e,@mouseDown
    addEventListener 'mousemove', (e) => @fortifyEvent e,@mouseMove
    addEventListener 'mouseup', (e) => @fortifyEvent e,@mouseUp

  fortifyEvent: (event,callFunction) ->
    event.left = event.clientX
    event.winWidth = window.innerWidth

      left : if @move.left.start? then (event.left-@move.left.start) else undefined
      right : if @move.right.start? then (event.right-@move.right.start) else undefined
    callFunction event
