jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js
2016-02-04 13:19:10 -05:00

24 lines
525 B
JavaScript

define(['browser'], function (browser) {
function layoutManager() {
var self = this;
self.setFormFactor = function (formFactor) {
self.mobile = false;
self.tv = false;
self[formFactor] = true;
};
// Take a guess at initial layout. The consuming app can override
if (browser.mobile) {
self.setFormFactor('mobile');
} else {
self.setFormFactor('desktop');
}
};
return new layoutManager();
});