Reputation: 7649
i am writing a google gadget for gmail. i am new to gadgets.for a gadget , i wirte first an html page then converted it into Module for google gadget.i used this module spec
<Module>
<ModulePrefs title="Cloud Factor Demo" scrolling="false" description="Cloud Factor Demo Design" author="Ritesh Mehandiratta" author_email="..." author_location="Mountain View, CA">
<Require feature="dynamic-height" />
<Require feature="google.contentmatch"></Require>
</ModulePrefs>
<!-- Define the content type and display location. The settings
"html" and "card" are required for all Gmail contextual gadgets. -->
<Content type="html" view="card"><![CDATA[
but when i goto my gmail page this html is in scrolling mode. i want to make its height same as the height it take how to remove this scrolling ?? here is screenshot of scrolling
Upvotes: 1
Views: 849
Reputation: 3224
By default, gadgets are 200 pixels high. If you want to use dynamic height feature, follow the steps below,
add <Require feature="dynamic-height" />
in ModulePrefs tag, which u already did. And whenever you feel, the height should be refreshed, call gadgets.window.adjustHeight();
example - If you want it to be done during page load,
<script>
function onPageLoaded() {
gadgets.window.adjustHeight();
}
</script>
<body onload="onPageLoaded()">
For more info, follow google developers link - https://developers.google.com/gadgets/docs/ui#Dyn_Height
Upvotes: 1