【问题标题】:How to create multiple tabs or sheets or pages in mxGraph?如何在 mxGraph 中创建多个选项卡或工作表或页面?
【发布时间】:2019-12-11 00:17:28
【问题描述】:

Draw.io具有多个pages的功能,底部有一个标签视图。

但要将其集成到 mxgraph 图形编辑器中,似乎有点过头了。

我正在寻找更简单的解决方案或某种解决方法。

【问题讨论】:

    标签: javascript mxgraph jgraph draw.io


    【解决方案1】:

    对于某种解决方法,我有解决方案。使用具有自定义根和两个层的模型在给定容器内创建图形。层也可以使用动态添加 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);
    

    看看example

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-23
      • 2018-09-17
      • 2012-10-09
      • 2021-07-11
      • 2015-07-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多