bound mouse events to document instead of element for smoother feel

Hey, I have no idea if I'm going this right. It's my first time doing a pull request!

Anyway, I stumbled upon your library, and found it useful. I made some updates to make it smoother, by still allowing the user to drag when the mouse leaves the directive elements. I just edited the build file...sorry about that, not sure what your build process is.

I'm not sure if this is useful to you at all, check it out if you're interested. Thanks for the great work!