[Mobile] Starting Context

Added check to make sure
user is touching only one object.
Started contextmenugesture to be
long touch, however currently long
touch is still infogesture.
This commit is contained in:
Shivam Dave
2015-07-27 10:20:08 -07:00
parent c85a3787c0
commit 3d0795cde3
3 changed files with 68 additions and 12 deletions

View File

@ -103,17 +103,20 @@ define(
}
function showTouchBubble(event) {
trackTouchPosition(event);
pendingBubble = $timeout(function () {
dismissBubble = infoService.display(
"info-table",
domainObject.getModel().name,
domainObject.useCapability('metadata'),
touchPosition
);
}, touchDELAY);
// Makes sure user is only touching one place
if (event.touches.length < 2) {
trackTouchPosition(event);
pendingBubble = $timeout(function () {
dismissBubble = infoService.display(
"info-table",
domainObject.getModel().name,
domainObject.useCapability('metadata'),
touchPosition
);
}, touchDELAY);
element.on('touchend', hideBubble);
element.on('touchend', hideBubble);
}
}
// Checks if you are on a mobile device, if the device is