tree custom drag&drom issue

Hi i have one question about tree.

The question is…

  1. When we drag & drop some values from part A to the right part, B, C, or D, we’d like the values would be left on the part A. For example, if we drag “bbb” from A and drop it at B, “bbb” would left where it was.
  2. We’d like to put ‘bbb’ to C and D even though we already put ‘bbb’ to A.
  3. When we put ‘bbb’ from A to B and put ‘bbb’ from A to B again, it shouldn’t be repeated, which means it should be shown only once. It is same as C and D part.

Unfortunately, the picture isn’t visible.

As for the mentioned scenarios, you can define your own DnD pattern for each view using the onBeforeDrop event. Here’s a quick sample:

http://webix.com/snippet/53371068

Thank you.
My questions for 1 and 2 are answered.

Question #3, I’d explain.
I wonder how not to duplicate the value from A.
I mean when I DnDn the value from A part several time, they are duplicated to part B as much as I DnD.

I want the value to be added to the part B only once.

Thank you.

You can check if there’s an item with the same ID or compare other attributes. For example:

onBeforeDrop:function(context){
    for (var i=0; i< context.source.length; i++){
        if (!this.exists(context.source[i])) 
            context.from.copy(context.source[i],context.start,this);
    }
    return false;
}