Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Detecting Swipe Sensitivity

$
0
0

Hi All,

 

Scenario:

- I have a Panoramic image.

- Users swipe left / right to reach both ends of the image

- I want the image to slide relative to the "intensity of the user's swipe/touch"


Question

Can I get any parameter from user's swipe? like swipeDistance or SwipeXposition before and after?

anything that helps me to know how far the user wants to slide the image.

 

Possible Execution:

If so, then I can use the parameter to calculate my own distance ratios like below (?)

 

$(window).bind("swipeleft", function(){

    distance =  calculateRange(SwipeIntensity)

    sym.$("image").animate({"left" : "-=distance"}, 1000, "easeInCubic")

});

 

 

Thanks in Advance


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>