Search code examples
google-slides-api

What's the equivalent of z-index (arrange order) send to back / bring to front with Slides API?


I am calling the slides API and retrieving multiple shape elements on a slide. These shapes are on top of each other, so only the one is visible. Is there a way from the API of telling which element is "visible" and in front?


Solution

  • The list of PageElement objects returned in Page.pageElements should be ordered by z-index, from back to front. I dont see this mentioned in the API docs, but you should be able to verify it yourself by playing with a few shapes in the Slides editor and checking the order they are returned by the API.