     @setInstanceVariables options
     @defaultInit options,data
 
+    @setClass 'kddraggable' if o.draggable
+
     if location.hostname is "localhost"
       @listenTo
         KDEventTypes        : "click"

      return no

  drag:(event, delta)->

    {directionX, directionY, axis} = @dragState
    {x, y} = delta

    y    = -y if directionY is "bottom"
    x    = -x if directionX is "right"
    posY = @dragState[directionY] + y
    posX = @dragState[directionX] + x

    if @dragIsAllowed
      @$().css directionX, posX unless axis is 'y'
      @$().css directionY, posY unless axis is 'x'

    @emit "DragInAction", x, y


      if eventNames.test(eventName) and "function" is typeof cb
        @on eventName, cb

  setEmptyDragState: ->
    @dragState =
      containment : null     # a parent KDView
      handle      : null     # a parent KDView or a child selector
      axis        : null     # a String 'x' or 'y' or 'diagonal'
      direction   : 
        current   :
          x       : null     # a String 'left' or 'right'
          y       : null     # a String 'up'   or 'down'
        global    :
          x       : null     # a String 'left' or 'right'
          y       : null     # a String 'up'   or 'down'
      position    : 
        relative  :
          x       : 0        # a Number
          y       : 0        # a Number
        initial   :
          x       : 0        # a Number
          y       : 0        # a Number
        global    :          
          x       : 0        # a Number
          y       : 0        # a Number
      meta        :
        top       : 0        # a Number
        right     : 0        # a Number
        bottom    : 0        # a Number
        left      : 0        # a Number


  setDraggable:(options = {})->
    options = {} if options is yes

    @setEmptyDragState()
    handle = if options.handle and options.handle instanceof KDView then handle else @

    handle.on "mousedown", (event)=>
