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

Sorry! It is working. I dont know  but at the start there was the same mistake.

Thanks for your help moro!

2

Still not working Moro. He still calls the select event while dragging sad

3

remove from Mif.Tree.Drag::ondrag

if(target && target.tree) this.tree.select(target);

4

Good afternoon to all,

When I do drag and drop with a node the programm calls the select event for every node which I drag over while drag and dropping.

This is my code:

function create_ontology_tree(){
    $('navigation').empty();
    return new Mif.Tree({
        container: $('navigation'),
    
                 expandTo : false,
        initialize: function(){
            new Mif.Tree.KeyNav(this);
            new Mif.Tree.Drag(this, {
                
                onComplete: function(){
                                      
                                            Request(
                        '../CopyCatchword.do',
                        {

                            'catchWordID' : this.current.data.catchWordID
                            
                        }
                                            );                                                                                     
                }                              

            });
        },
               
        dfltType:'folder',
        
        height: 18
    })

        .load({
         url: "../GetJson.do"

    })

        
    .addEvent('select',function(node){
                Request(
            '../SelectCatchword.do',
            { 'catchWordID' : node.data.catchWordID}
        );
    })
                        
    
    .addEvent('toggle',function(node, state){

             Request(

            '../Toggle.do',
            { 'catchWordID' : node.data.catchWordID }
        );
    });
    
}

Is there a chance to prevent this?
I dont want him to call the event 'select' when I drag a node over other nodes.

Greetings Jonathan