Apps Script Gadget Setting 100% Width and Height Bug?

非 Y 不嫁゛ 提交于 2019-12-04 06:46:24

问题


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


回答1:


The "leave blank for 100%" only works on the width attribute. You will have to determine some appropriate height for your script. I do not think there is a work around.

Furthermore, if you were able to set the height to 100%, that tells the browser to make the gadget fill 100% of the container (i.e. the page around the gadget). It does not tell the browser to fill 100% of the contents inside.




回答2:


Though it cannot be set from gadget pref, maybe you can code your Gadget code so that the frame height is updated when you change the html content. See this nice example:
https://developers.google.com/gadgets/docs/ui#Dyn_Height



来源:https://stackoverflow.com/questions/15082386/apps-script-gadget-setting-100-width-and-height-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!