mirror of
https://github.com/nasa/openmct.git
synced 2025-06-20 08:03:49 +00:00
[Mobile] Update agentService usages
This commit is contained in:
@ -58,11 +58,11 @@ define(
|
||||
dismissBubble();
|
||||
dismissBubble = undefined;
|
||||
}
|
||||
|
||||
|
||||
// Detaches body touch listener
|
||||
body.off('touchstart', hideBubble);
|
||||
}
|
||||
|
||||
|
||||
// Displays the bubble by tracking position of
|
||||
// touch, using infoService to display the bubble,
|
||||
// and then on any body touch the bubble is dismissed
|
||||
@ -77,7 +77,7 @@ define(
|
||||
domainObject.useCapability('metadata'),
|
||||
touchPosition
|
||||
);
|
||||
|
||||
|
||||
// On any touch on the body, default body touches/events
|
||||
// are prevented, the bubble is dismissed, and the touchstart
|
||||
// body event is unbound, reallowing gestures
|
||||
@ -87,12 +87,12 @@ define(
|
||||
body.unbind('touchstart');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Checks if you are on a mobile device, if the device is
|
||||
// mobile (agentService.isMobile() = true), then
|
||||
// the a click on something (info button) brings up
|
||||
// the a click on something (info button) brings up
|
||||
// the bubble
|
||||
if (agentService.isMobile(navigator.userAgent)) {
|
||||
if (agentService.isMobile()) {
|
||||
element.on('click', showBubble);
|
||||
}
|
||||
|
||||
|
@ -65,11 +65,11 @@ define(
|
||||
this.infoService = infoService;
|
||||
this.delay = delay;
|
||||
this.domainObject = domainObject;
|
||||
|
||||
|
||||
// Checks if you are on a mobile device, if the device is
|
||||
// not mobile (agentService.isMobile() = false), then
|
||||
// the pendingBubble and therefore hovering is allowed
|
||||
if (!agentService.isMobile(navigator.userAgent)) {
|
||||
if (!agentService.isMobile()) {
|
||||
// Show bubble (on a timeout) on mouse over
|
||||
element.on('mouseenter', this.showBubbleCallback);
|
||||
}
|
||||
@ -99,7 +99,7 @@ define(
|
||||
// arrays allocated while user mouses over things
|
||||
this.mousePosition = undefined;
|
||||
};
|
||||
|
||||
|
||||
InfoGesture.prototype.showBubble = function (event) {
|
||||
var self = this;
|
||||
|
||||
@ -132,7 +132,7 @@ define(
|
||||
|
||||
this.element.on('mouseleave', this.hideBubbleCallback);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Detach any event handlers associated with this gesture.
|
||||
|
Reference in New Issue
Block a user