Browser reports gestureMap missing with chriswessels:hammer


#1

This Meteor code uses chriswessels:hammer 4.0.2, the browser console gives this warning when this Meteor template is rendered. And holding the left mouse button down and moving left does not fire the console.log('moved left'). What am I doing wrong? Thanks

You haven’t passed a gesture map into HammerTouchArea using gestureMap property.

But I have, please see my code below:

<template name="swipe">
   {{#HammerTouchArea configureCallback=configureHammer gestureMap=swipeGestures}}
     <p class="whole swipe" data-id={{this.index}}>{{{value}}}</p>
   {{/HammerTouchArea}}
</template> 

Template.swipe.helpers({
  'configureHammer': function () {
    return function (hammer, templateInstance) {
      var swipeleft = new Hammer.Swipe({
        event: 'swipeleft',
        pointers: 1,
        velocity: 0.5
      });
      hammer.add(swipeleft);
      return hammer;
    }
  },
  swipeGestures: {
     'swipeleft .swipe': function (event, templateInstance) {
      console.log('moved left');
    }
  }
});