Results 1 to 2 of 2

Thread: panel position of treepanel node

  1. #1
    Sencha User
    Join Date
    Jan 2011
    Posts
    10
    Vote Rating
    0
      0  

    Default 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?

  2. 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();
    }

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,147
    Answers
    87
    Vote Rating
    34
      0  

    Default

    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();
    }

Tags for this Thread

Posting Permissions

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