alexfoxy / lax.js

Simple & lightweight (<4kb gzipped) vanilla JavaScript library to create smooth & beautiful animations when you scroll.
MIT License
10.43k stars 491 forks source link

Responsive breakpoints doesn't work on change window size #147

Closed MarkusHeinisch closed 3 years ago

MarkusHeinisch commented 3 years ago

I've added these two maps, but if i use the chrome dev tool with responsive mode or i simply change the window size, the breakpoints doesn't work. It only works when i switch manually to pixel 2 or desktop resolution.

{ selector: '.foo1-1', animationData: { scrollY: { translateX: [ ['elInY', 'elCenterY+200', 'elOutY'], { 1023: [0, 0, 0], 1024: [0, 0, '-screenWidth'], }, ], }, }, },

alexfoxy commented 3 years ago

Please provide some example code or a codepen for me to look at.

MarkusHeinisch commented 3 years ago

Its solved