chrisbateman / impetus

Agnostic utility for adding momentum to anything. It's like iScroll, except not for scrolling. Supports mouse and touch events.
chrisbateman.github.io/impetus
MIT License
487 stars 70 forks source link

Provide method to update values #5

Closed saru-dev closed 10 years ago

saru-dev commented 10 years ago

great plug-in. trying to incorporate it into another plug-in but find that where the target is an image in chrome all is well, but not in safari or firefox . www.thoughtand.co/stax

chrisbateman commented 10 years ago

I think this is the Drag and Drop API in action. You should be able to solve this by adding an event listener for "dragstart" and calling preventDefault() on it.

I'm thinking I probably won't add this to Impetus, because you can do it more efficiently by adding one event listener for everything (I should add a note about it to the documentation though). Let me know if you feel strongly otherwise.

saru-dev commented 10 years ago

Chris, thanks this is great and makes a big difference . one last thing: moving an impetus div after it's been moved by jquery animate or other creates a mismatch between its last impetus recorded coordinates and its new current coordinates - which makes for staggered movements . is there a simple way to reinitiate with the current divs coordinates ?

sorry these are simple things but it's my first attempt at a plug in - albeit jquery lego .

many thanks, Sam

On Monday, 7 April 2014, 4:46, Chris Bateman notifications@github.com wrote:

Closed #5. — Reply to this email directly or view it on GitHub.