【问题标题】:jsPlumb function failed : TypeError: Cannot read properties of undefined (reading 'resetBounds')jsPlumb 函数失败:TypeError:无法读取未定义的属性(正在读取“resetBounds”)
【发布时间】:2021-09-27 08:43:24
【问题描述】:

当我添加类型为“Bezier”的连接器属性时,添加连接时会抛出

jsPlumb function failed : TypeError: Cannot read properties of undefined (reading 'resetBounds')
ERROR TypeError: Cannot read properties of undefined (reading 'canvas')
at BrowserJsPlumbInstance.setConnectorHover (jsplumb.browser-ui.es.js:4774)

我将以下属性添加到 addEndPoint

import {BezierConnector} from '@jsplumb/connector-bezier'
{
    endpoint: {
      type: DotEndpoint.type,
      options:{
        radius: 7
    }
    },
    paintStyle: { fill: '#99cb3a' },
    source: true,
    connector:{
      type:BezierConnector.type,
      options:{
        curviness:50
      }
    },
}

【问题讨论】:

    标签: angular jsplumb


    【解决方案1】:

    为了将来遇到此问题的人们的利益,该问题已在on Github 进行了讨论,原因似乎是 jsPlumb 包的混合版本。

    您必须使用与@jsplumb/browser-ui 相同版本的@jsplumb/connector-flowchart 等。理论上这是由包本身强制执行的;在这种情况下尚不清楚这种不匹配是如何产生的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 1970-01-01
      • 2022-11-11
      • 2022-08-08
      • 2022-07-22
      • 1970-01-01
      • 2022-09-12
      相关资源
      最近更新 更多