-
12 Nov 2012 3:35 PM #1
Answered: panel position of treepanel node
Answered: panel position of treepanel node
Is there a way to determine the (x,y) pixel position of a node in a treepanel in relation to the panel element?
-
Best Answer Posted by tvanzoelen
The element of the node can be retrieved by
Code:var record = tree.getStore().getNodeById(node.internalId); var viewNode = Ext.fly(tree.getView().getNode(record)); //in anycase get the element of the node in the view and then... if(viewNode){ var x = viewNode.getLocalX(); var y = viewNode.getLocalY(); }
-
13 Nov 2012 1:48 AM #2Ext JS Premium Member
- Join Date
- Apr 2008
- Location
- Groningen - Netherlands
- Posts
- 1,017
- Vote Rating
- 23
- Answers
- 75
The element of the node can be retrieved by
Code:var record = tree.getStore().getNodeById(node.internalId); var viewNode = Ext.fly(tree.getView().getNode(record)); //in anycase get the element of the node in the view and then... if(viewNode){ var x = viewNode.getLocalX(); var y = viewNode.getLocalY(); }


Reply With Quote