【问题标题】:How do I calculate the height of diagram created dynamically in gojs如何计算在 gojs 中动态创建的图表的高度
【发布时间】:2016-01-20 05:16:02
【问题描述】:

如何计算在 gojs 中以编程方式创建的图表的高度。

我有 myDiagram.nodeTemplate 后跟 myDiagram.groupTemplate

我将 myDiagram.actualBounds 设为未定义。 myDiagram.outerBounds 的高度未定义。

我知道一旦计算出来我必须打电话:

var div = diagram.div;
div.style.width = 'I need to calculate this!!!';
diagram.requestUpdate();

但我不知道我的图表是什么宽度。

谁能帮忙。

【问题讨论】:

    标签: javascript gojs


    【解决方案1】:

    你最有可能想要Diagram.documentBounds.width

    你看到了吗:http://forum.nwoods.com/t/is-it-possible-to-have-dynamic-height-on-canvas/6450

    【讨论】:

      猜你喜欢
      • 2011-03-12
      • 2011-11-02
      • 2016-12-28
      • 2014-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-24
      相关资源
      最近更新 更多