ApoorvSaxena / ApoorvSaxena/lozad.js

Compatibility with smooth scroll

未关闭
#256 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
7.5k
派生
435
PR 合并指标
30 天内没有已合并 PR

描述

Hello,

## Expected Behavior
It should work as expected/normal behaviour when using a smooth-scroll library, for example [locomotive-scroll](https://github.com/locomotivemtl/locomotive-scroll).

## Current Behavior
It does not work, which is likely because Lozad does not know the current scroll position.

## Possible Solution
Option to detect by native (existing) scroll or by another means on desktop? I.e...

```
smoothScroll.on('scroll', (obj) => {
updateScroll(obj.scroll.x, obj.scroll.y);
});
```

Here is an example of that: [Preview ](https://www.curtainsjs.com/examples/multiple-planes-scroll-effect-custom-scroll/index.html) / [Code](https://github.com/martinlaxenaire/curtainsjs/blob/master/examples/multiple-planes-scroll-effect-custom-scroll/js/multiple.planes.parallax.setup.js).

## Steps to Reproduce (for bugs)
Just install Locomotive Scroll, and Lozad as normal.

## Tested on:
Latest version of Chrome on Windows 10 and MacOS.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。