Skip to content

Commit

Permalink
remove resizing on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
nrchtct committed Dec 13, 2023
1 parent be25b2d commit 96f0478
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions js/scrolling.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,7 @@ function update(){
item.domObject.style["z-index"] = 3;
}else{
item.domObject.style["z-index"] = 2;
}
let element = item.domObject;
let rect = element.getBoundingClientRect();
let elementY = rect.top + rect.height / 2;
let minScale = .75;
let maxScale = 1;
let scale = minScale + (maxScale - minScale) * ((windowHeight - elementY) / middleY);
if (elementY<middleY) scale = 1;
element.style.transform = `translate(${item.varianz}px,0) scale(${scale})`;
}
})
//update the cursor
updateCursor(currentSession,currentProgress)
Expand Down

0 comments on commit 96f0478

Please sign in to comment.