How to remove the main layout?

Hi guys,

How I can remove the main layout?

I have the following code in my project:

	webix.ready(function(){
		webix.ui.fullScreen();
		webix.protoUI({
		    name:"editlist"
		}, webix.EditAbility, webix.ui.list);

                // INSERT A CODE TO REMOVE ALL LAYOUTS (IF EXISTS) HERE!		

		webix.ui({
			view: "layout",
			id: "mLayout",
			container: "mLayout",
			rows: [ide_layout]
		});
	});

I need to remove the “mLayout” layout.
Webix have a method to remove the main layout if it it already added?

In fact, the most proper way to do this is to use removeView. To remove the parent layout, you can check whether there’s a top parent view. However, you need to know the ID of at least one of the currently initialized views.

But I would suggest you reinitialize the existing layout in webix.ui call rather than deleting+creating the new one: http://webix.com/snippet/ac5648a4

Please check also the dedicated article.

Also, please note that if you need to use these views multiple times, a multiview can make a switch between views more comprehensive (without unnecessary layout rebuilding).