{"id":19651815,"url":"https://github.com/tanaikech/arrangestackingorder","last_synced_at":"2026-03-13T15:21:18.127Z","repository":{"id":79705747,"uuid":"152336855","full_name":"tanaikech/ArrangeStackingOrder","owner":"tanaikech","description":"ArrangeStackingOrder is a GAS library for arranging the stacking order of page elements on Google Slides using Google Apps Script (GAS).","archived":false,"fork":false,"pushed_at":"2018-10-10T00:00:51.000Z","size":180,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T09:51:11.262Z","etag":null,"topics":["developer-tools","gas-library","google-apps-script","google-slides","library"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanaikech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-09T23:57:55.000Z","updated_at":"2024-03-12T10:08:41.000Z","dependencies_parsed_at":"2023-06-26T19:09:35.131Z","dependency_job_id":null,"html_url":"https://github.com/tanaikech/ArrangeStackingOrder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanaikech%2FArrangeStackingOrder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanaikech%2FArrangeStackingOrder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanaikech%2FArrangeStackingOrder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanaikech%2FArrangeStackingOrder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanaikech","download_url":"https://codeload.github.com/tanaikech/ArrangeStackingOrder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251345996,"owners_count":21574813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["developer-tools","gas-library","google-apps-script","google-slides","library"],"created_at":"2024-11-11T15:08:10.479Z","updated_at":"2026-03-13T15:21:18.051Z","avatar_url":"https://github.com/tanaikech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ArrangeStackingOrder\r\n=====\r\n\r\n\u003ca name=\"TOP\"\u003e\u003c/a\u003e\r\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENCE)\r\n\r\n\u003ca name=\"Overview\"\u003e\u003c/a\u003e\r\n# Overview\r\n**ArrangeStackingOrder is a GAS library for arranging the stacking order of page elements on Google Slides using Google Apps Script (GAS).**\r\n\r\n\r\n\u003ca name=\"demo\"\u003e\u003c/a\u003e\r\n# Demo\r\n![](images/demo.gif)\r\n\r\nThis is a demonstration of this library when this is used as a Google Slides Addon.\r\n\r\n\u003ca name=\"Description\"\u003e\u003c/a\u003e\r\n# Description\r\nDo you have situations that you want to arrange the stacking order of page elements on Google Slides using GAS? I had it before. At that time, I could achieve it by creating a simple script. Recently, I found that users who have the same situation. I thought that if there is a library for this, it will be useful for me and other developers. So I created this. If this was useful for your situation, I'm glad.\r\n\r\n\r\n# Library's project key\r\n~~~\r\n1YJkHduBJjk7eDbwWCp20YGSjHZsELb4F_q2Fmxs7zgZclZULI84Yjm0f\r\n~~~\r\n\r\n\r\n\u003ca name=\"Howtoinstall\"\u003e\u003c/a\u003e\r\n# How to install\r\nIn order to use this library, please install this as a library.\r\n\r\n1. [Install ArrangeStackingOrder library](https://developers.google.com/apps-script/guides/libraries).\r\n    - Library's project key is **``1YJkHduBJjk7eDbwWCp20YGSjHZsELb4F_q2Fmxs7zgZclZULI84Yjm0f``**.\r\n\r\n\r\n\u003ca name=\"Usage\"\u003e\u003c/a\u003e\r\n# Usage\r\n- **When you use this library, please select objects on a slide. This library uses the selected objects.**\r\n- **Please use the project of the container-bound script type of Google Slides.**\r\n\r\nThere are 5 methods in this library.\r\n\r\n| Method | Description |\r\n|:---|:---|\r\n| top() | Move to the top of the stacking order. |\r\n| bottom() | Move to the bottom of the stacking order. |\r\n| front() | Move to the 1 step front of the stacking order. |\r\n| behind() | Move to the 1 step behind of the stacking order. |\r\n| inverse() | Inverse the stacking order. |\r\n\r\nFor each method, ``pageElements`` of selected objects is returned.\r\n\r\n# Samples\r\nBefore you use this, please install this library.\r\n\r\n~~~javascript\r\nvar slides = SlidesApp.getActivePresentation();\r\n\r\n// top()\r\nvar res = ArrangeStackingOrder.getSlides(slides).top();\r\n\r\n// bottom()\r\nvar res = ArrangeStackingOrder.getSlides(slides).bottom();\r\n\r\n// front()\r\nvar res = ArrangeStackingOrder.getSlides(slides).front();\r\n\r\n// behind()\r\nvar res = ArrangeStackingOrder.getSlides(slides).behind();\r\n\r\n// inverse()\r\nvar res = ArrangeStackingOrder.getSlides(slides).inverse();\r\n~~~\r\n\r\n# Principle\r\nIn Google Slides, for example, when new shape is created on a slide, the shape is created to the top of the stacking order. At that time, when the change of ``pageElements`` is confirmed, it is found that the created shape is added to the last element to ``pageElements``. This means that the last element is the top of the stacking order. This library was created by using this principle. Although I think that this can be also created by Slides API, in this library, I used the slides service, because Slides API is not required to be enabled.\r\n\r\n-----\r\n\r\n\u003ca name=\"Licence\"\u003e\u003c/a\u003e\r\n# Licence\r\n[MIT](LICENCE)\r\n\r\n\u003ca name=\"Author\"\u003e\u003c/a\u003e\r\n# Author\r\n[Tanaike](https://tanaikech.github.io/about/)\r\n\r\nIf you have any questions and commissions for me, feel free to tell me.\r\n\r\n\u003ca name=\"Update_History\"\u003e\u003c/a\u003e\r\n# Update History\r\n* v1.0.0 (October 10, 2018)\r\n\r\n    1. Initial release.\r\n\r\n\r\n[TOP](#TOP)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanaikech%2Farrangestackingorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanaikech%2Farrangestackingorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanaikech%2Farrangestackingorder/lists"}