angular-hammer icon indicating copy to clipboard operation
angular-hammer copied to clipboard

How to remove/unbind an event

Open TrangNguyen opened this issue 9 years ago • 0 comments

Hi, I'm using angular-hammer to allow saving an object on vertical pan after passing a certain threshold. The logic is, if the dragging position event.center.y passes the threshold, it should trigger a save on panend. If it does not pass the threshold, the object returns to its starting position and by the next pan, it should reset. It works the first time, however, the event panend is registered — so if the first pan didn't reach the threshold (it still emit panend) which by the second pan (passing the threshold) the emitted panend would be called even though the current pan does not end.

Is there a way to remove/unbind the panend event?

Thank you

TrangNguyen avatar May 28 '15 15:05 TrangNguyen