Topic: Problem with drag and drop
Good afternoon to all,
When I do drag and drop with a node the programm calls the select event for every node which I drag over while drag and dropping.
This is my code:
function create_ontology_tree(){
$('navigation').empty();
return new Mif.Tree({
container: $('navigation'),
expandTo : false,
initialize: function(){
new Mif.Tree.KeyNav(this);
new Mif.Tree.Drag(this, {
onComplete: function(){
Request(
'../CopyCatchword.do',
{
'catchWordID' : this.current.data.catchWordID
}
);
}
});
},
dfltType:'folder',
height: 18
})
.load({
url: "../GetJson.do"
})
.addEvent('select',function(node){
Request(
'../SelectCatchword.do',
{ 'catchWordID' : node.data.catchWordID}
);
})
.addEvent('toggle',function(node, state){
Request(
'../Toggle.do',
{ 'catchWordID' : node.data.catchWordID }
);
});
}Is there a chance to prevent this?
I dont want him to call the event 'select' when I drag a node over other nodes.
Greetings Jonathan