fix typo rev57
I've implemented the beforeDrop example. I try to copy node using CTRL key unfortunately beforeDrop event
doesn't receive any var to make difference between a MOVE and a COPY ...
event? beforeDrop — method. you can use this:
new Mif.Tree.Drag(this, {
beforeDrop: function(current, target, where){
/*if(confirm('drop node?')){
this.drop();
}else{
this.emptydrop();
}*/
var action=this.tree.key[this.options.modifier] ? 'copy' : 'move';
//...what you want to do
}
});
in which aspect onBeforeDrop is different of onComplete event ?
what is onBeforeDrop? exists only beforeDrop method. It's used for redefiend default drop behavior. "beforeDrop" not the best name and can be changed in future.
for my ldap browser I only use where = inside. Does it exists any way to force inside behavior and hide visual icon/style helper that indicate if we are after, before or inside ?
if you set dropDenied=['before','after'] will be shown only inside icon.
tree = new Mif.Tree({
...
types: {
some_type:{
...
dropDenied: ['before','after']
},
})