compute_touch_action.html 551 B

123456789101112131415161718
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, user-scalable=no">
  5. <title></title>
  6. </head>
  7. <body>
  8. Open the inspector and play a bit with the touchAction property.
  9. <script src="../../hammer.min.js"></script>
  10. <script>
  11. var mc = new Hammer(document.body);
  12. mc.add(new Hammer.Swipe({ direction: Hammer.DIRECTION_HORIZONTAL }));
  13. mc.add(new Hammer.Pan({ direction: Hammer.DIRECTION_HORIZONTAL }));
  14. console.log(document.body.style.touchAction)
  15. </script>
  16. </body>
  17. </html>