Last active
January 16, 2017 14:31
-
-
Save RitaDias/45e99caf14dac0571d725771b5587bea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function touchStart(startX, startY) { | |
| var menuOpen = document.querySelector(".menu.menu--visible"); | |
| if (menuOpen !== null) { | |
| isOpen = true; | |
| } else { | |
| isOpen = false; | |
| } | |
| menu.classList.add("no-transition"); | |
| appMenu.classList.add("no-transition"); | |
| isMoving = true; | |
| menuWidth = document.querySelector(".app-menu").offsetWidth; | |
| lastX = startX; | |
| lastY = startY; | |
| if (isOpen) { | |
| moveX = 0; | |
| } else { | |
| moveX = -menuWidth; | |
| } | |
| dragDirection = ""; | |
| menu.classList.add("menu--background-visible"); | |
| // why is this being added? ‘.menu--background-visible .menu-background’ makes the overlay | |
| // ‘active’, displaying it on the DOM for those sweet opacity changes. | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment