mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
parent
1d4fe979b1
commit
3017e67f3a
1 changed files with 3 additions and 1 deletions
|
@ -5,7 +5,7 @@ function slideoutMenu(viewport, menu) {
|
|||
var touchStartPos = null;
|
||||
var touchCurPos = null;
|
||||
var touchStartTime = 0;
|
||||
var menuWidth = parseFloat(window.getComputedStyle(menu).width);
|
||||
var menuWidth = 0;
|
||||
var menuIsOpen = false;
|
||||
var menuIsMoving = false;
|
||||
|
||||
|
@ -27,6 +27,8 @@ function slideoutMenu(viewport, menu) {
|
|||
var touch = e.touches.item(0);
|
||||
viewport.classList.toggle("menu-dragging", true);
|
||||
|
||||
menuWidth = parseFloat(window.getComputedStyle(menu).width);
|
||||
|
||||
if ((!menuIsOpen && touch.screenX < 50) || (menuIsOpen && touch.screenX > menuWidth)) {
|
||||
touchStartPos = touch;
|
||||
touchCurPos = touch;
|
||||
|
|
Loading…
Reference in a new issue