Topic: copy node and beforeDrop event

Hello,

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 ...

in which aspect onBeforeDrop is different of  onComplete event ?
why you don't implement both in one ?

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 ?

Re: copy node and beforeDrop event

As I report on google code   you have a typo bug in your beforeDrop function.
http://code.google.com/p/miftree/issues/detail?id=2

Re: copy node and beforeDrop event

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']
            },
})

Re: copy node and beforeDrop event

Nice ! I will try immediately

Re: copy node and beforeDrop event

Problem solved! Thank you Moro