 
   drag:(event, delta)->
 
-    {directionX, directionY, axis} = @dragState
+    {directionX, directionY, axis, containment} = @dragState
 
     {x, y}       = delta
     dragPos      = @dragState.position

      @dragIsAllowed = yes
      @setEmptyDragState()

      dragState             = @dragState

      # TODO: should move these lines
      dragState.containment = options.containment
      dragState.handle      = options.handle
      dragState.axis        = options.axis



      newX = if targetPosX is 'left' then dragMeta.left + dragRelPos.x else dragMeta.right  - dragRelPos.x
      newY = if targetPosY is 'top'  then dragMeta.top  + dragRelPos.y else dragMeta.bottom - dragRelPos.y

      if containment
        m  = w: @getWidth(), h: @getHeight()
        p  = containment.viewBounds
        cp = containment.padding
        if newX <= 0 + cp.x then newX = 0 + cp.x
        if newY <= 0 + cp.y then newY = 0 + cp.y
        if newX + m.w + cp.x >= p.w - cp.x then newX = p.w - m.w - cp.x
        if newY + m.h + cp.y >= p.h - cp.y then newY = p.h - m.h - cp.y

      el.css targetPosX, newX unless axis is 'y'
      el.css targetPosY, newY unless axis is 'x'
