Creating Desktop

You can create Desktop as a Webix view or as a standalone Jet app. Both ways will lead to the same result.

  • Creating Desktop as a Webix view:
function start(user) {
    webix.ready(function() {
        if (webix.env.touch) webix.ui.fullScreen();
        else if (webix.env.scrollSize) webix.CustomScroll.init();
        desktop = webix.ui({
            view: "desktop",
            systemParams: user,
            apps: myApps,
        });
    });
}
login("someurl").then(start);

Related sample:  Desktop: View Initialization

  • Initializing Desktop as an instance of Jet app class and render it in the document body (or in any other HTML container):
function start(user) {
    webix.ready(function() {
        if (webix.env.touch) webix.ui.fullScreen();
        else if (webix.env.scrollSize) webix.CustomScroll.init();
        app = new desktop.App({
            systemParams: user,
            apps: myApps,
        });
        app.render(document.body);
    });
}
login("someurl").then(start);

Related sample:  Desktop: JetApp Initialization

Back to top