PageItem Index across all Frametypes
The field "Index" of PageItem in JS is relative to the Type. Therfore for 3 TextFrames and 3 Rectangles the Index is 0,1,2 and again 0,1,2. This applies to all different Types.
But somehow InDesign and InDesign Server still know which Frame has higher z-index even if they have the same number.
Example: Textframe with index 5 can be in front of Rectangle with index 5. If i tell it to move one up, it still has index 5 but is now in front of the Rectangle.
Is there a way to get the Index across all the Frames and Frametypes?
I already have a solution thats works by duplicating the frames and grouping them. On this approach, everything will be a Group and i can take this Index. But this is way to complicated. There needs to be another way to get this.