为什么绑定“;move_node.jstree”;移动一组节点时,第一个节点只激发一次
Why does binding "move_node.jstree" only fire once, for the first node, when moving a group of nodes?
有人能告诉我为什么绑定"move_node.jstree"在移动一组节点时只为第一个节点触发一次吗?以及如何检测移动的所有节点?
我需要检测所有被移动的节点,这样我就可以通过自定义的ajax函数进行报告。这是我目前正在使用的,但它只为我选择的同时移动的节点中的第一个节点运行。
.bind("move_node.jstree", function (e, data) {
/*
data.rslt contains:
.o - the node being moved
.r - the reference node in the move
.ot - the origin tree instance
.rt - the reference tree instance
.p - the position to move to (may be a string - "last", "first", etc)
.cp - the calculated position to move to (always a number)
.np - the new parent
.oc - the original node (if there was a copy)
.cy - boolen indicating if the move was a copy
.cr - same as np, but if a root node is created this is -1
.op - the former parent
.or - the node that was previously in the position of the moved node
*/
var eventID = data.rslt.o.attr("id").substring(11);
var groupID = data.rslt.np.attr("id").substring(11);
commitEventMove(eventID,groupID);
//alert("bind-move_node fired");
})
一天半后,我终于找到了正确的问题编号!:-D如果你有同样的问题,请查看解决方案:
http://code.google.com/p/jstree/issues/detail?id=805
这个家伙最好在新版本发布时整理一套像样的文档,因为当前版本有问题。
相关文章:
- 而循环只设置php中输入字段中的第一个值
- 错误:$injector:modulerr模块错误(我的第一个SPA应用程序)
- IE11中的第二个调用取消了第一个Fetch API调用
- Javascript XMLHttpRequest——只有第一个POST请求有效
- 使用javascript或angularjs特定过滤器搜索字符串中第一个img标记的json值
- 将OnClick函数设置为<ul>,最后一个ul是擦除第一个ul-s
- RxJS油门行为;立即获取第一个值
- 仅首先需要使用jasmine从节点添加一个文件
- Angular UI网格:如何通过第一个UI网格中的按钮使第二个UI网格可见
- 选择多个实例中的第一个
- 如何在调用下一个请求之前完成第一个Ajax Get请求
- Lodash:返回对象的第一个键,该对象的值(即数组)中有一个给定的元素(即字符串)
- 看起来第一个console.log是'It’不太对
- 与杜兰达尔合作的第一个JavaScript项目.尝试从第三方 API 获取数据
- 节点发布错误对象的第一个“属性”
- Javascript:表单验证getElementById仅返回第一个id元素
- 仅将 CSS 规则应用于
中的第一个 ,而不分配类/ID - JS在隐藏未定义的值后仅从数组中返回第一个id的值
- 为了研究节点并制作好产品,哪个技术堆栈(模块、框架)更适合第一个node.js项目
- 将节点从第二个移动到第一个