Updated to use bounds instead of doc offset - mouse events clientX and
clientY are viewport relative.