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