3

I want to show an animation (an arrow moving left or right depending on which direction the swipe is happening) when the user has started to swipe to either sides of the screen, that is the user has started the swipe but not yet completed the swipe. This animation will happen at the point when angular.js scripts has decided that the swipe is towards which direction (towards left or right).

Once the script analyses the swipe movement and understands the direction where the swipe is being taken to, then an animation should be played until the swipe is complete or when the user pulls his/her finger away from the screen.

When the swipe is complete the next screen should be shown to the user.

I know ng-swipe-left and ng-swipe-right but I dont know how to show an animation in between the swipe start and swipe complete.

How to do this?

isherwood
  • 58,414
  • 16
  • 114
  • 157
Temp O'rary
  • 5,366
  • 13
  • 49
  • 109
  • Have you tried the IonicFramework which has integrated directives just doing that? – AMG Feb 05 '15 at 18:48
  • Thanks @AMG. But Iconic is a framework, right? This project is already closed but this new requirement just came in as an update. I don't think it is now feasible to start with a new framework altogether. But I dont know Iconic Framework, if we still can make it work by including just a few lines of Iconic code then a little bit of help with code will be greatly appreciated ! – Temp O'rary Feb 05 '15 at 18:53
  • Clear. Yeah you could include the ionic.bunddle.min.js library and then add a few lines of ionic code. I am concerned however that the file might be a bit too "heavy" for just a simple animation, so its not the solution. Lets see what others say. Perhaps you can get inspired bu the ionic swipe-left and swipe-right directives? – AMG Feb 05 '15 at 19:01
  • Angular.js has its inbuilt `ng-swip-left` and `ng-swipe-right` directives but those fire when swipe is done. I want an intermediate action/event where the user has started to swipe and is still swiping but has not yet completed the swipping action. – Temp O'rary Feb 05 '15 at 19:33

0 Answers0