xpull icon indicating copy to clipboard operation
xpull copied to clipboard

overscroll should have a limit

Open hirbod opened this issue 9 years ago • 2 comments

Currently, when max-distance is reached, you can still keep dragging. There should be a limit

hirbod avatar Oct 20 '15 16:10 hirbod

+1

zilions avatar Mar 01 '16 02:03 zilions

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'); }

coldwhiz avatar Jul 28 '17 19:07 coldwhiz