We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我的例子就是简单复用了官网中思维导图的样例,然后在增加了 节点编辑工具。但我仔细翻阅了官网的change方法,也做了各种尝试,发现无法在编辑节点时监听到值的变化。我只能在双击事件中开始一个监听,并在点击画布空白事件中关闭监听,并通过graph.toJSON()方法手动过滤并维护渲染这个思维导图的data数据,以实现前端的暂时保存。
暂无
No response
The text was updated successfully, but these errors were encountered:
现在还没有好的方式来监听文本的修改。有一个思路就是监听节点属性变化:
graph.on('node:change:attrs', ({ current }) => { if (current) { const value = current.text.text; } })
不过存在一个问题,当双击节点的时候,因为会将原来节点文本清空,也会触发上面事件。
Sorry, something went wrong.
现在还没有好的方式来监听文本的修改。有一个思路就是监听节点属性变化: graph.on('node:change:attrs', ({ current }) => { if (current) { const value = current.text.text; } }) 不过存在一个问题,当双击节点的时候,因为会将原来节点文本清空,也会触发上面事件。
好的,那就期待你们的新功能了。
双击一个有文字的节点之后,手动把节点的文字清空,然后完成编辑,也希望能触发change事件,目前没有触发,导致监听不到文字被清空
No branches or pull requests
问题描述
我的例子就是简单复用了官网中思维导图的样例,然后在增加了 节点编辑工具。但我仔细翻阅了官网的change方法,也做了各种尝试,发现无法在编辑节点时监听到值的变化。我只能在双击事件中开始一个监听,并在点击画布空白事件中关闭监听,并通过graph.toJSON()方法手动过滤并维护渲染这个思维导图的data数据,以实现前端的暂时保存。
重现链接
暂无
重现步骤
暂无
预期行为
暂无
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: