         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
+        if newX <= 0 + cp.left then newX = 0 + cp.left
+        if newY <= 0 + cp.top  then newY = 0 + cp.top
+        if newX + m.w >= p.w - cp.right  then newX = p.w - m.w - cp.right
+        if newY + m.h >= p.h - cp.bottom then newY = p.h - m.h - cp.bottom
 
       el.css targetPosX, newX unless axis is 'y'
       el.css targetPosY, newY unless axis is 'x'

    mouseleave    : "mouseLeave"
    mousemove     : "mouseMove"
    mousewheel    : "mouseWheel"
    contextmenu   : "contextMenu"
    dragstart     : "dragStart"
    dragenter     : "dragEnter"


  mouseUp:(event)->    yes

  mouseOver:(event)->  yes

  mouseDown:(event)->
    (KD.getSingleton "windowController").setKeyView null
    yes

  paste:(event)->      yes

  # HTML5 DND
  dragEnter:(e)->
