mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 13:41:21 +00:00
GUAC-324: Implement menu scroll.
This commit is contained in:
@@ -813,8 +813,11 @@ GuacUI.Client.updateTitle = function () {
|
|||||||
GuacUI.Client.showMenu = function(shown) {
|
GuacUI.Client.showMenu = function(shown) {
|
||||||
if (shown === false)
|
if (shown === false)
|
||||||
GuacUI.Client.menu.className = "closed";
|
GuacUI.Client.menu.className = "closed";
|
||||||
else
|
else {
|
||||||
|
GuacUI.Client.menu.scrollLeft = 0;
|
||||||
|
GuacUI.Client.menu.scrollTop = 0;
|
||||||
GuacUI.Client.menu.className = "open";
|
GuacUI.Client.menu.className = "open";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1547,10 +1550,15 @@ GuacUI.Client.attach = function(guac) {
|
|||||||
|
|
||||||
// Hide menu if swiping left
|
// Hide menu if swiping left
|
||||||
else if (GuacUI.Client.isMenuShown()) {
|
else if (GuacUI.Client.isMenuShown()) {
|
||||||
|
|
||||||
|
GuacUI.Client.menu.scrollLeft -= change_drag_dx;
|
||||||
|
GuacUI.Client.menu.scrollTop -= change_drag_dy;
|
||||||
|
|
||||||
if (dx <= -64 && Math.abs(dy) < 32 && duration < 250) {
|
if (dx <= -64 && Math.abs(dy) < 32 && duration < 250) {
|
||||||
GuacUI.Client.showMenu(false);
|
GuacUI.Client.showMenu(false);
|
||||||
guac_drag.cancel();
|
guac_drag.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, drag UI
|
// Otherwise, drag UI
|
||||||
|
Reference in New Issue
Block a user