mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Stop long press detection when scrolling.
This commit is contained in:
@@ -477,16 +477,24 @@ GuacamoleUI.attach = function(guac) {
|
|||||||
var view_height = GuacamoleUI.viewport.offsetHeight;
|
var view_height = GuacamoleUI.viewport.offsetHeight;
|
||||||
|
|
||||||
// Scroll horizontally if necessary
|
// Scroll horizontally if necessary
|
||||||
if (mouse_view_x > view_width)
|
if (mouse_view_x > view_width) {
|
||||||
GuacamoleUI.viewport.scrollLeft += mouse_view_x - view_width;
|
GuacamoleUI.viewport.scrollLeft += mouse_view_x - view_width;
|
||||||
else if (mouse_view_x < 0)
|
GuacamoleUI.stopLongPressDetect();
|
||||||
|
}
|
||||||
|
else if (mouse_view_x < 0) {
|
||||||
GuacamoleUI.viewport.scrollLeft += mouse_view_x;
|
GuacamoleUI.viewport.scrollLeft += mouse_view_x;
|
||||||
|
GuacamoleUI.stopLongPressDetect();
|
||||||
|
}
|
||||||
|
|
||||||
// Scroll vertically if necessary
|
// Scroll vertically if necessary
|
||||||
if (mouse_view_y > view_height)
|
if (mouse_view_y > view_height) {
|
||||||
GuacamoleUI.viewport.scrollTop += mouse_view_y - view_height;
|
GuacamoleUI.viewport.scrollTop += mouse_view_y - view_height;
|
||||||
else if (mouse_view_y < 0)
|
GuacamoleUI.stopLongPressDetect();
|
||||||
|
}
|
||||||
|
else if (mouse_view_y < 0) {
|
||||||
GuacamoleUI.viewport.scrollTop += mouse_view_y;
|
GuacamoleUI.viewport.scrollTop += mouse_view_y;
|
||||||
|
GuacamoleUI.stopLongPressDetect();
|
||||||
|
}
|
||||||
|
|
||||||
// Send mouse event
|
// Send mouse event
|
||||||
guac.sendMouseState(mouseState);
|
guac.sendMouseState(mouseState);
|
||||||
|
Reference in New Issue
Block a user