locomotive-scroll icon indicating copy to clipboard operation
locomotive-scroll copied to clipboard

Only calculate drag movement for set scroll direction

Open odysseuscm opened this issue 3 years ago • 0 comments

Before, when used in vertical scrolling, x was always smaller than this.instance.limit.x resulting in the problem described here: https://github.com/locomotivemtl/locomotive-scroll/issues/362 From a performance point of view it is better to not do both calculations, as only one scroll direction can apply. Most other function use the same distinction between this.direction === 'horizontal' and 'vertical',

odysseuscm avatar Oct 30 '21 12:10 odysseuscm