Skip to content

Instantly share code, notes, and snippets.

@mfyz
Last active September 25, 2015 14:56
Show Gist options
  • Save mfyz/5db4be8569a466cfad99 to your computer and use it in GitHub Desktop.
Save mfyz/5db4be8569a466cfad99 to your computer and use it in GitHub Desktop.
Framerjs scrollcomponent scroll and tap conflict solution.
var tapStartX, tapStartY;
list_item.on(Events.TouchStart, function(e){ tapStartX = e.pageX; tapStartY = e.pageY; });
list_item.on(Events.TouchEnd, function(e){
if (Math.abs(e.pageX - tapStartX) < 20 && Math.abs(e.pageY - tapStartY) < 20) {
// real tap happened
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment