Skip to forum content

Mif

— mystic javascript interface

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields labelled (Required) must be completed before the form is submitted.

Required information for guests



Captcha image. Turn pictures on to see it.
Required information
Optional post settings

Topic review (newest first)

1

great ! thank you !

best regards,
claudette

2

try implement custom action. You can use this code as prototype (here idea, not a real example):

...
new Mif.Tree.Drag(this, {
            action:'dndCustomAction',
            ...
        });
...


Mif.Tree.implement({

    dndCustomAction: function(current, target, where){
        if(current.tree==target.tree){
            current.tree.move(current, target, where);
        }else{
            current.tree.copy(current, target, where);
        }
    }
    
});

3

thank you moro for your quick response!

but I only have to copy when I'm dragging from one tree to another, not within a tree. How do I know from which tree the current dragged node  is?

thanks in advance!

claudette.

4

u can add action:'copy' and u will always copy nodes instead moving:

tree = new Mif.Tree({
    container: $('tree_container'),
    initialize: function(){
        new Mif.Tree.KeyNav(this);
        new Mif.Tree.Drag(this, {
            action:'copy',
            ...
        })
    }
...

5

hello everybody,

I have two trees, and I would like to always copy a node from one tree to the other one.
is it possible? how can I do it?

thanks a lot,
claudette.