Add onresize accessibility

This commit is contained in:
Hyunchul Kim 2021-09-12 03:08:04 +09:00
parent 66b7f14922
commit a48dc089f8
2 changed files with 6 additions and 1 deletions

View file

@ -304,5 +304,10 @@
<!-- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1080 734"> -->
<script src="src/scripts/physicsLayout.js"></script>
<script src="src/scripts/accessibility.js"></script>
<script>
window.onresize = () => {
onresizeAccessibility();
}
</script>
</body>
</html>

View file

@ -2,7 +2,7 @@
let isZoomed = false;
let thresholdForButtons = 1080;
window.onresize = () => {
onresizeAccessibility = () => {
if (window.innerWidth < thresholdForButtons && isZoomed) {
const zoom = document.querySelector("#zoom")
const sound = document.querySelector("#sound")