locomotive-scroll
locomotive-scroll copied to clipboard
Only calculate drag movement for set scroll direction
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',