简体   繁体   English

jQWidgets jqxTree拖放失败

[英]jQWidgets jqxTree drag and drop fails

Here is a fiddle that shows my problem. 这是一个小提琴 ,显示了我的问题。 When you open "Folder A" and "Folder B", drag "Item of B" out of the folder and drag "Item of A" into "Folder B", you can't drag "Item of B" correctly anymore. 当您打开“文件夹A”和“文件夹B”时,将“ B的项目”拖出文件夹,然后将“ A的项目”拖到“文件夹B”,就无法再正确地拖动“ B的项目”。

I delete the children of collapsed folders because of the performance. 由于性能原因,我删除了折叠文件夹的子级。 There are often more then 300 Items, which makes the tree very slow. 通常有300多个项目,这使得树非常慢。

In my real program I also receive an error message: "TypeError: item is null" in the first line of the dragEnd callback function. 在我的真实程序中,我在dragEnd回调函数的第一行中还收到一条错误消息:“ TypeError:item is null”。 Here is the function: 这是函数:

function( item, dropItem, args, pos ){
    var item_data = tree_map[ item.id ];
    // here i do some stuff...
    // only dropItem exists in the arguments
    return false;
};

How can I fix this? 我怎样才能解决这个问题?

In my more minimalistic test I found out, that this is a bug and I got it confirmed by the jQWidgets support. 在更简化的测试中,我发现这是一个错误,并且得到jQWidgets支持的确认。

$("#delsel").click(function(){
    $("#jqxTree").jqxTree("removeItem", $("#jqxTree").jqxTree("getSelectedItem") );
});

It fails, when you delete an item. 删除项目时失败。 Seems to be a bug in the internal collection. 似乎是内部集合中的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM