この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

明示的なキャンバスアプリケーションのサイズ変更

次のコード例に、resize メソッドをコールしてキャンバスアプリケーションのサイズを変更する方法を示します。高さと幅のパラメータを指定しない場合、親ウィンドウはキャンバスアプリケーションの高さをそのコンテンツに基づいて判断しようと試み、その結果に応じて iFrame の幅と高さを設定します。

1swfobject.registerObject("clippy.codeblock-0", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17// Automatically determine the size.
18Sfdc.canvas(function() {
19    sr = JSON.parse('<%=signedRequestJson%>');
20    Sfdc.canvas.client.resize(sr.client);
21});
22
23// Set the height and width explicitly.
24Sfdc.canvas(function() {
25    sr = JSON.parse('<%=signedRequestJson%>');
26    Sfdc.canvas.client.resize(sr.client, {height : "1000px", width : "900px"});
27});
28
29// Set only the height.
30Sfdc.canvas(function() {
31    sr = JSON.parse('<%=signedRequestJson%>');
32    Sfdc.canvas.client.resize(sr.client, {height : "1000px"});
33});
34