getting a "wobble" effect on a draggable element. perhaps caused by event delay?
I've been rewriting a simple image manipulation interface. I've put it up here:
http://subcog.net/croptool3/layer_test_jquery.html
I have a slider on the left (slide the blue box up and down), and you can drag the highlighted part of the image. However, you'll notice that there's a ton of "wobble" when you drag the highlighted part.
The effect is achieved using 3 layers: A base layer is the image itself. On top of that I have a semi-transparent black layer, to give it a darked-out look. Finally the top layer serves as a fake "window" to the bottom layer. The top layer is essentially a smaller div with the original image set as the background, but offset appropriately to give the effect of cutting through the dark layer.
My hypothesis is that the "wobble" is caused by a delay in the "drag" event. I'm wondering if jquery is allowing the user to continue to drag, even before the function called by the "drag" event finishes?
Any ideas on how to fix the wobble?