1 Reply Latest reply on Oct 13, 2010 1:03 PM by Peter Kahrel

    Is there a way to obtain absolute page position of any item?


      I want to obtain the absolute page position of an item created through scripting. Let me give you an example. I have created a rectangle inside a cell:


          var tempRectangle = cell.insertionPoints.item(-1).rectangles.add({
              geometricBounds = [0,0,cell.height,cell.width];


      But, because of dynamic content being loaded into the table, there could be any number of rows before this cell and so the cell can be anywhere on the page. I simply want to read the geometric bounds of the rectangle relative to the page rather than relative to the cell, so I can find out where the rectangle actually is. Don't ask why, I just do!


      So, is there any way of obtaining the geometric bounds relative to the whole page, or otherwise finding an absolute upper-left edge, or any position relative to the page? I know I can calculate it by keeping track of everything that came before it and what's around it and adding everything up, but that's extremely tedious and inelegant and knowing me, I'll write it badly and it'll be inaccurate.


      Thank you in advance to anyone who can help one way or another!