ApoorvSaxena / ApoorvSaxena/lozad.js

Compatibility with smooth scroll

Abierto
#256 0 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
7.5k
Forks
435
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.