hammerjs / hammer.js

A javascript library for multi-touch gestures :// You can touch this

Home Page:http://hammerjs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After PAN stopped once its reached the boundary, Position Resets

msmani9891 opened this issue · comments

Am working on a feature, which has draggable element used with pan option. And it is hides beyond the viewport/body.

So that checked a condition on when the position goes to < 0, stopped the drag with stop().

Its working fine, as it wont allow the div not to go beyond the viewport.
But, there is a problem while again pan the div. The position resets to inital position. I just want the pan from the pervious position not from the reset location.

I have recreated this problem with this example:
https://codepen.io/msmani9891/pen/ZEboGwV