Hey
so i have a touchstart event applied to a button - when the user presses on the button i'd like the button to change size and add a drop shadow.
however, if the user should slide their finger off the button, then i'd like the button to size back to normal. And if they were to then slide their finger back on said button, to add the drop shadow etc again.
To this end i created a touchend event, which sized the button back to normal. This combination works fine if the user merely presses on and then releases the button - but does not work if the finger slides off the button. When that happens, the touchend apparently does not fire, and the button is maintained at the enlarged size. If the user finger is released while not on the button, the button is still in the enlarged size.
Is there some sort of idiom I am meant to apply?
2 Answers
Not 100% sure of what you're trying to achieve (its been a long day and its late)
but from what I understand - you want to have two different events, the click event t detect clicks and a swipe event to detect sliding of finger
I would listen for the touchMove event and see if x/y are greater than the Button.size.height/width
Your Answer
Think you can help? Login to answer this question!