Results 1 to 2 of 2

Thread: TreePanel - movenode + rawEvent

  1. #1
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    769

    Default TreePanel - movenode + rawEvent

    Does anybody know how i can get rawEvent when movenode or beforemovenode is fired? I would like to get from rawEvent if ctrl-key was pressed or not.

    I wanted fix bug in app when user draging and droping node to same tree and when he put node to same place ( he can see line above draged node ) move events are not fired.

    I need to use movenode events because in drop events dont know old and newParent.

    Thank you for tips

  2. #2
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    769

    Default

    Solved ...

    Code:
    var pressedCtrl = false;
    Code:
    listeners:{
    	beforenodedrop: function( e ) {
    		if ( e.rawEvent.ctrlKey )
    			pressedCtrl = true;
    		else
    			pressedCtrl = false;
    	}
    	,movenode: function( tree, node, oldParent, newParent, index ) {
    		console.log(pressedCtrl);
    	}
    	,nodedrop: function ( e ) {
    		pressedCtrl = false;
    	}
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •