asvd/dragscroll

Add indicator during scroll

Closed this issue · 0 comments

Hi Folks,

since I need to be able to click items within the scroll area when this is not in "scroll mode" I added an addidtional class to the dragscroll-element. So I can query this class to prevent clicking these items during scroll. Perhaps anyone would like to use this too:

Snippet:

after Line 61:

el.classList.remove("dragging");

after Line 70:

el.classList.add("dragging");

Handle the click with jQuery:

$(".item").on("mouseup", function() { if(!$(this).parents(".scroll-area").hasClass("dragging")) { // do something } })