Skip to content

Commit

Permalink
error fixed of limit x, error fixed in demo dynamicColor function
Browse files Browse the repository at this point in the history
  • Loading branch information
zoe authored and zoe committed Mar 11, 2021
1 parent cc00ae1 commit 75ae3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import LocomotiveScroll from '../../../src/locomotive-scroll';
let dynamicColorElements = [];

scroll.on('scroll', (instance) => {
const progress = 360 * instance.scroll.y / instance.limit;
const progress = 360 * instance.scroll.y / instance.limit.y;

scroll.el.style.backgroundColor = `hsl(${progress}, 11%, 81%)`;

Expand Down

0 comments on commit 75ae3ed

Please sign in to comment.