Skip to content

Commit

Permalink
fix: disable scrolling out of UI
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperwyczawski committed Aug 24, 2024
1 parent 8f371fb commit aab2772
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions play.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

html {
height: 100%;
overflow: hidden;
}

body {
Expand All @@ -25,7 +25,9 @@ body {
color: var(--dark);
margin: 0;
padding: 0;
height: 100%;
height: 100dvh;
width: 100dvw;
overflow: hidden;
}

p {
Expand Down Expand Up @@ -329,4 +331,4 @@ a.button {
& p {
margin-top: 0;
}
}
}
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Panzoom(table, {
disableZoom: true,
startX: window.innerWidth / 2 - table.clientWidth / 2,
startY: window.innerHeight / 2 - table.clientHeight / 2,
cursor: "default",
roundPixels: true,
});

function q(selector: string) {
Expand Down

0 comments on commit aab2772

Please sign in to comment.