mirror of
https://github.com/nasa/openmct.git
synced 2025-06-03 08:00:52 +00:00
[Mobile] Clean Up
Fixed InfoService having 0 in wrong spot. Also correctly compared the UserAgent device to iPhone for isMobile function in AgentService.
This commit is contained in:
parent
0b635afcf7
commit
0a39984c4f
@ -59,7 +59,7 @@ define(
|
|||||||
// phone is designated as only an
|
// phone is designated as only an
|
||||||
// iPhone device
|
// iPhone device
|
||||||
function isPhone(ua) {
|
function isPhone(ua) {
|
||||||
if (getDeviceUA(ua) == "iPhone") {
|
if (getDeviceUA(ua)[0] === "iPhone") {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -62,10 +62,10 @@ define(
|
|||||||
// to where clicked or pressed)
|
// to where clicked or pressed)
|
||||||
bubble.css('position', 'absolute');
|
bubble.css('position', 'absolute');
|
||||||
if (agentService.isPhone(navigator.userAgent)) {
|
if (agentService.isPhone(navigator.userAgent)) {
|
||||||
bubble.css('right', 0 + 'px');
|
bubble.css('right', '0px');
|
||||||
bubble.css('left', 0 + 'px');
|
bubble.css('left', '0px');
|
||||||
bubble.css('top', 'auto');
|
bubble.css('top', 'auto');
|
||||||
bubble.css('bottom', 25 + 'px');
|
bubble.css('bottom', '25px');
|
||||||
} else {
|
} else {
|
||||||
if (goLeft) {
|
if (goLeft) {
|
||||||
bubble.css('right', (winDim[0] - position[0] + OFFSET[0]) + 'px');
|
bubble.css('right', (winDim[0] - position[0] + OFFSET[0]) + 'px');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user