Google Apps脚本小工具设置100%宽度和高度的Bug?(Apps Script Gadge

2019-08-17 04:25发布

I embedded a UiApp in a webpage in Google Site that contains a flextable. The width and height of the gadget can change depending on how many items are in the flextable; so when I embed it I leave the width and height blank in the gadget setting in order to get the UiApp shown 100% width and height (as instructed in the gadget setting). However, its never shown 100% height; when I check the HTML of the webpage I found that the width & the height is always set to a certain value (width="500" height="600") so my display is cut and not shown fully.

How do I ensure that my UiApp are fully shown in the page?

Thanks

Answer 1:

该“留空100%”仅适用于宽度属性。 您必须确定您的脚本一些适当的高度。 我不认为这是一个解决办法。

此外,如果你能够设置高度为100%,即告诉浏览器,使小工具填充容器的100%(即周围的小工具页)。 它不会告诉浏览器,填补了100%的内容里面



Answer 2:

虽然它不能小工具PREF设置,也许你可以使画面高度被更新,当您更改HTML内容代码小工具的代码。 看到这个很好的例子:
https://developers.google.com/gadgets/docs/ui#Dyn_Height



文章来源: Apps Script Gadget Setting 100% Width and Height Bug?