如何将操作绑定到“创建/删除新节点” DynaTree 中的事件?
DynaTree 入门。我想将一些代码绑定到“添加新节点”的事件。 onCreate 选项似乎在第一次渲染节点时被触发。是的,这包括创建节点的时间,但也包括加载和渲染树的时间,以及第一次展开折叠子树的时间。所以看起来不太合适。同样的问题也适用于删除节点。这些事件在哪里?
谢谢, 马可.
Getting started with DynaTree. I'd like to bind some code to the event which is "adding a new node". The onCreate option seems to be fired when a node is rendered for the first time. Yes, this includes when a node is created, but it also includes when the tree is loaded and rendered, and when a collapsed subtree is expanded for the first time. So it doesn't seem appropriate. The same question applies to removing a node. Where are these events?
Thanks,
Marco.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
那么您想在添加子项时执行代码吗?我通过创建自己的小函数来添加节点来做到这一点。
然后,您只需调用该函数并传入 NodeID(键)、NodeName(标题)、ParentID(键)即可。
So you want to execute code when you add a child? I did this by creating my own little function to add Nodes.
Then you simply call the function and pass in the NodeID (key), NodeName (title), ParentID (key).