Topic: two drag and drop functions

Hello,

I want to make use of two different drag and drop functions in my tree.

So I want to use two times :

new Mif.Tree.Drag(this, {
                
                onComplete:
                              
                                ...

But I want to differ them. That means that the user has the choice which one of these two should be called. I thought that it would be a good idea that he is choosing by pressing a certain key on the keyboard.

So I want that when he presses 'STRG+X' while dragging the first drag and drop function is called. And when he is pressing nothing, the second one.

Is it possible to do something like that??

Re: two drag and drop functions

don't understand where is problem and for why 2 functions, just add if check:

onComplete: function(){
   if(presed_something){
        //do presed action
   }else{
       //do another action
   }
}