     dragGlobDir.x = if x > 0 then 'right'  else 'left'
     dragGlobDir.y = if y > 0 then 'bottom' else 'top'
 
-    el = @$()
     if @dragIsAllowed
+      el = @$()
       dragMeta   = @dragState.meta
       targetPosX = if dragMeta.right  and not dragMeta.left then 'right'  else 'left'
       targetPosY = if dragMeta.bottom and not dragMeta.top  then 'bottom' else 'top'

        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'

          dragState.containment.viewBounds = @[view].getBounds()
        dragState.containment.viewBounds or= @parent.getBounds()
        dragState.containment.padding = \
          options.containment.padding or top: 0, right: 0, bottom: 0, left: 0

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