1

I am using hmmer.js. Trying to rotate image on android by multi touch. I just want to increase or decrease the rotation angle of image. In that case I need to have events for clock wise and anticlock wise.

Can anyone tell me, how to recognize that is element being rotated in clock wise or anti clock wise?

1 Answer 1

0

The event object given by Hammer contains a rotation property which is the angle of rotation in degrees. It ranges from -180 to 180, and is negative when the rotation is anti-clockwise and positive when it's clockwise.

You can test for yourself in this plunker: https://plnkr.co/edit/uVCYoytxc12llL74oyOI?p=preview

1
  • actually i think it goes from -360 to 360
    – whodeee
    Commented Mar 22, 2016 at 18:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.