mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
Review and integrate mobile-2008 (#2040)
Fixes #2008 * Viewport metatag updated * Fix to Time Conductor for Safari * Remove data visualization element in TC * Hide TC ticks when on mobile * Add touch functionality to mct-drag * Reduced size of image thumbnails; Changed min-heights of image and thumbnail holders for .mobile.phone * remove create dialog from mobile
This commit is contained in:
committed by
Andrew Henry
parent
e19ce4ac8c
commit
c909831dd4
@ -44,11 +44,26 @@ define(
|
||||
*/
|
||||
function MobileClassifier(agentService, $document) {
|
||||
var body = $document.find('body');
|
||||
Object.keys(DeviceMatchers).forEach(function (key) {
|
||||
|
||||
Object.keys(DeviceMatchers).forEach(function (key, index, array) {
|
||||
if (DeviceMatchers[key](agentService)) {
|
||||
body.addClass(key);
|
||||
}
|
||||
});
|
||||
|
||||
if (agentService.isMobile()) {
|
||||
var mediaQuery = window.matchMedia('(orientation: landscape)');
|
||||
|
||||
mediaQuery.addListener(function (event) {
|
||||
if (event.matches) {
|
||||
body.removeClass('portrait');
|
||||
body.addClass('landscape');
|
||||
} else {
|
||||
body.removeClass('landscape');
|
||||
body.addClass('portrait');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return MobileClassifier;
|
||||
|
Reference in New Issue
Block a user