Skip to content

Commit

Permalink
chore(player): update y change var's name :)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jun 6, 2024
1 parent f0f7f83 commit 5413a2e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/static/js/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,13 +886,12 @@ audioPlayerEl.addEventListener("progress", () => {
console.log("downloading...");
});

let _collapsedStartY = 0;
let playerStartY = 0;

playerEl?.addEventListener(
"touchstart",
(e) => {
_collapsedStartY = e.touches[0].pageY;
console.log("meow", _collapsedStartY);
playerStartY = e.touches[0].pageY;
},
{ passive: true },
);
Expand All @@ -901,10 +900,10 @@ playerEl?.addEventListener(
"touchmove",
async (e) => {
const y = e.touches[0].pageY;
if (y > _collapsedStartY + 75) {
if (y > playerStartY + 75) {
collapse();
}
if (y < _collapsedStartY + 25) {
if (y < playerStartY + 25) {
expand();
}
},
Expand Down

0 comments on commit 5413a2e

Please sign in to comment.