xpull
xpull copied to clipboard
overscroll should have a limit
Currently, when max-distance is reached, you can still keep dragging. There should be a limit
+1
I changed the code inside IF statement "if(top > 1)" located in xpull.js -> line 114, into this and it worked.
if(inst.elast){ $(document.body).on('touchmove.'+pluginName,function(e){ //e.preventDefault(); }); inst.elast = false; } if((top - inst.indicatorHeight)<0) { /* Set the min to avoid cuts on top */ var top_lap = 0; } else { if((top - inst.indicatorHeight)>100) { /* Set the max */ var top_lap = 100; } else { var top_lap = (top - inst.indicatorHeight); } } $(elm).css({ '-webkit-transform': "translate3d(0px, " + top_lap + "px, 0px)" }); inst.indicator.css({ 'top': top_lap + "px" }); if(top > inst.options.pullThreshold && !hasc){ inst.indicator.addClass('arrow-rotate-180'); }else if(top <= inst.options.pullThreshold && hasc){ inst.indicator.removeClass('arrow-rotate-180'); }