resetLayout

rebuilds the Gantt layout using the current value of the layout config

void resetLayout();

Example

gantt.init("gantt_here");
 
gantt.config.layout = {
    css: "gantt_container",
    rows: [
        {
            cols: [
                {view: "grid", scrollX: "scrollHor", scrollY: "scrollVer"},
                {resizer: true, width: 1},
                {view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
                {view: "scrollbar", id: "scrollVer"}
            ]
        },
        {view: "scrollbar", id: "scrollHor", height: 20}
    ]
};
 
gantt.resetLayout();

Details

This method removes custom layers added to the timeline area via the addTaskLayer and addLinkLayer methods. Therefore, you need to redefine these ones after calling the gantt.resetLayout method in order for custom layers to be displayed on a page.

See also
Back to top