How to create multiple tabs or sheets or pages in mxGraph?

540 Views Asked by At

Draw.io has the feature of multiple pages with a tab view in the bottom.

But to integrate that into mxgraph graph editor, it seems like an overkill.

I'm looking for a simpler solution or some sort of workaround.

1

There are 1 best solutions below

0
Bohdan Skochko On BEST ANSWER

for sort of workaround I have solution. Creates the graph inside the given container using a model with a custom root and two layers. Layers can also be added dynamically using const layer = model.add(root, new mxCell()).

const root = new mxCell();
const  layer0 = root.insert(new mxCell());
const layer1 = root.insert(new mxCell()); 
const model = new mxGraphModel(root);

Just look example