0
votes

I'm using a panel with border layout in which west region contains the tree and center region contains the panel which is extending from a panel with column layout. The tree is loading data from json (draggable). Items is adding to the panel at the center region when the user drops the node form tree. But for adding the itms in panel i'm using panel.add method which is always adding at the last position. But i want to add it wherever the user dropped it.

Tried with panel.add(droppeditem).showAt(e.getXY())

But it's giving the error as Uncaught TypeError: Cannot call method 'translatePoints' of undefined.

Can anybody help me to achieve this

Regards URL

1

1 Answers

0
votes

I had the same error with a context menu on a tree panel. When I added the context menu view to the refs inside my controller with an xtype and an autoCreate set to true it fixed the problem. It is almost like the object (context menu) was not getting instantiated. Example:

var contextMenu = this.getPortletMenuContext();
contextMenu.showAt(event.getXY());

I was getting the same error above until I added:

{ ref: 'portletMenuContext', selector: 'portletmenucontext', xtype: 'portletmenucontext', autoCreate: true }

To my refs inside my controller.