Hello, i need to implement mouse resistance in javascript.
As an example of what i mean, think of how the Enligthenment window manager handles screen edge resistance to switch between different desktops, or if you are not familiar with that:
imagine a large rectangle with a square within it. when click-moving the mouse [onmousedown] within the square, the mouse lets itself be moved until the borders of the square, then exercises some resitance until a threshold is met, and then moves around within the larger rectangle.
Ideally the mouse cursor should stay trapped within the square until that threshold isnt met, and only leave that area if it is met.
Any ideas or examples of this somewhere? A crossbrowser solution is also greatly appreciated. (down to ie7, that is) Thanks!