google-slides

Google Slides Elements Selection Order Issue

a 夏天 提交于 2020-08-08 05:31:39
问题 I was trying to get the selected shapes from the user's current selection in Google slides with Apps Script. The shapes return are not always match the user's selection order. Example: Let's say we have 4 shapes on the slide, #1, #2, #3, #4. If I select #4, #2, #3, #1 on the slide one by one, the return result should match [shape#4, shape#2, shpae#3, shape#1]. However, I found sometimes the return result is a mess, not reflect the actual order I select. Not sure if this is a bug or something.

Google Slides Elements Selection Order Issue

吃可爱长大的小学妹 提交于 2020-08-08 05:30:05
问题 I was trying to get the selected shapes from the user's current selection in Google slides with Apps Script. The shapes return are not always match the user's selection order. Example: Let's say we have 4 shapes on the slide, #1, #2, #3, #4. If I select #4, #2, #3, #1 on the slide one by one, the return result should match [shape#4, shape#2, shpae#3, shape#1]. However, I found sometimes the return result is a mess, not reflect the actual order I select. Not sure if this is a bug or something.

How to convert elements to the same size as the first selected element?

北战南征 提交于 2020-08-08 05:16:07
问题 I want to set the size of all elements as the size of the first selected element. but seems something wrong with my code , somehow first element size not working for others. Please see attached script /* * Make all elements same size */ function sameSizeElements() { var selection = SlidesApp.getActivePresentation().getSelection(); var selectionType = selection.getSelectionType(); var pageElements = selection.getPageElementRange().getPageElements(); //iterate the selected page elements to grab