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

I use   onCopy action to solve my issue ...

2

seems should be

target.tree.getSelected()['switch'](true);

3

Considering 2 trees. One without checkboxes and the other with checkboxes.
I want to copy node from the first tree to the second and tick the checkbox.  Unfortunately when I try to
do it doesn't works ...

Seems that copy method returns always reference from the original tree...
I've setup the custom dnd action on the destination tree ...


                Mif.Tree.implement({
                
                    dndCustomAction: function(current, target, where){
                        if(current.tree==target.tree){
                            current.tree.move(current, target, where);
                        }else{
                            var tree = current.tree.copy(current, target, where);
                            tree.getSelected().switch(true);
                        }
                    }
                });
----- 

tree1 = new Mif.Tree({
                        ...                
                        initialize: function(){
                              ...
                              new Mif.Tree.Drag(this, {
...     
                     
tree2 = new Mif.Tree({
                        ...                
                        initialize: function(){
                                ...
                               this.initCheckbox('deps');
                               new Mif.Tree.Drag(this, {
                                action:'dndCustomAction',
                                                                ...