jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js

24 lines
525 B
JavaScript
Raw Normal View History

2016-02-04 11:19:10 -07:00
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();
});