Hi~
I’ve got 2 trees where you can drag and drop between them (for the most part). Anyways, when one of the trees is empty I create a dragLanding so I can “drag” back into the empty tree.
Now, when I drag back into the dragLanding I programtically move the item into the empty tree. So far all is good, but since the tree is no longer empty, I would like to remove the dragLanding.
How can I do this?
var parentId = xtree.getParentId(nodeid);
xtree.moveItem(nodeid,'item_child',0,deleteTree);
if(parentId != "0")
{
nodeClick(parentId);
}
else
{
var sInput = document.getElementById("emptyLocTree");
deleteTree.dragger.addDragLanding(sInput, new s_control);
}
function s_control() {
this._drag = function(sourceHtmlObject, dhtmlObject, targetHtmlObject) {
deleteTree.moveItem(nodeid,'item_child',0,xtree);
targetHtmlObject.style.backgroundColor = "";
}
this._dragIn = function(htmlObject, shtmlObject) {
htmlObject.style.backgroundColor = "#fffacd";
return htmlObject;
}
this._dragOut = function(htmlObject) {
htmlObject.style.backgroundColor = "";
return this;
}
}