mirror of
https://github.com/nasa/openmct.git
synced 2025-03-24 13:05:35 +00:00
[Mobile] Clean Up
Cleaned up context menu gesture comments with spacing.
This commit is contained in:
parent
f0c64b6b92
commit
63b41d796a
@ -55,14 +55,17 @@ define(
|
||||
|
||||
// When context menu event occurs, show object actions instead
|
||||
if (!agentService.isMobile(navigator.userAgent)) {
|
||||
|
||||
// When context menu event occurs, show object actions instead
|
||||
element.on('contextmenu', showMenu);
|
||||
} else if (agentService.isMobile(navigator.userAgent)) {
|
||||
|
||||
// If on mobile device, then start timeout for the single touch event
|
||||
// during the timeout 'isPressing' is true.
|
||||
element.on('touchstart', function (event) {
|
||||
if (event.touches.length < 2) {
|
||||
isPressing = true;
|
||||
|
||||
// After the timeout, if 'isPressing' is
|
||||
// true, display context menu for object
|
||||
$timeout(function () {
|
||||
@ -72,6 +75,7 @@ define(
|
||||
}, longTouchTime);
|
||||
}
|
||||
});
|
||||
|
||||
// Whenever the touch event ends, 'isPressing' is false.
|
||||
element.on('touchend', function (event) {
|
||||
isPressing = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user