Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Snap vs. Drag event #2

Closed
meleyal opened this issue Oct 21, 2010 · 1 comment
Closed

Snap vs. Drag event #2

meleyal opened this issue Oct 21, 2010 · 1 comment

Comments

@meleyal
Copy link

meleyal commented Oct 21, 2010

IE has problems with the sample rate using periodical when there are more / complex elements on the page. It seem to be called too slowly, so there is no momentum when you release the mouse, the dragged element simply stops.

Calling the sample() method directly on each drag event works better:

this.addEvent('drag', function(el) {
  this.sample();
});

Is this less efficient?

@benlenarts
Copy link
Owner

I've tried this, but the problem is that this doesn't sample when the mouse doesn't move. So if you drag quickly, then stop and then release after some time, the element still shoots off. There is no harm - except a performance hit - in doing both, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants