 
     $(document).on 'mousemove', (e) =>
       if @dragging
-        @$el.offset
+        @el.offset
           top: e.pageY - relY
           left: e.pageX - relX
 

    console.log e

  # Helper functions
  generatePosition: ->
    doc_width = $(document).width()
    doc_height = $(document).height()

  className: "window-container"

  events: 
    'click .close-window'      : 'closeWindow'
    'mousedown .window-title'  : 'startDrag'
    'mouseup'                  : 'endDrag'
    'click .toggle-settings'   : 'toggleSettings'
    'mousedown .window'        : 'updateSize'
    'mouseup .window'          : 'resizeCheck'

  elements:
    '.window' : 'window'
