Hi,

im trying do open a Ext.menu.Menu on the beforedrop-event of a Ext.tree.Panel but i can't figure out an elegant way to determine the current mouse position. In data.event i found the method getXY() but that's the drag start position.

The only way i found is to bind a listener on the highlightitem event of the tree view and store the position (see example).

Can someone give me an suggestion for a better solution?

PHP Code:
this.getView().on('highlightItem', function(viewel) {
    
this.ddcontextmenuXY = [Ext.get(el).getLeft() + 2Ext.get(el).getTop() + Ext.get(el).getHeight()];
}, 
this);
this.getView().on('beforedrop', function(nodedataoverModeldropPositiondropHandlereOpts) {
    var 
ddcontextmenu Ext.create('Ext.menu.Menu', {
        
items: [{text'test'}]
    });
    
ddcontextmenu.showAt(this.ddcontextmenuXY);
    return 
false;
}, 
this); 
Thanks in advance, CptS.