調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
移動
Blockly のメイン ワークスペースは、スクロールバー、マウス、マウスホイールの 3 つの方法で移動できます。
移動設定は、Blockly の構成の一部であるオブジェクトによって定義されます。次に例を示します。
var workspace = Blockly.inject('blocklyDiv',
{move:{
scrollbars: {
horizontal: true,
vertical: true
},
drag: true,
wheel: false}
});
ワークスペースに垂直スクロールバーと水平スクロールバーのどちらを表示するかを指定します。水平方向のスクロールが有効かどうかを horizontal
プロパティで判断し、vertical
プロパティによって垂直スクロールが有効かどうかを判定するオブジェクトを取得します。ブール値が渡された場合は、horizontal
プロパティと vertical
プロパティの両方をその値として設定したオブジェクトを渡すのと同じ結果になります。ワークスペースにカテゴリがある場合、デフォルトは true
(水平方向と垂直方向の両方のスクロールが有効)です。
ドラッグ
マウスでワークスペースをドラッグできるかどうかを指定します。scrollbars
が false
の場合は、常に false
になります(少なくともオプション解析で)。scrollbars
が true
の場合のデフォルトは true
です。
車輪
マウスホイールでワークスペースをスクロールできるかどうかを指定します。scrollbars
が false
の場合は、常に false
になります(少なくともオプション解析では)。デフォルトは false
です。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-01 UTC。
[null,null,["最終更新日 2023-12-01 UTC。"],[[["Blockly workspaces can be navigated using scrollbars, mouse dragging, and mouse wheel scrolling."],["These navigation options are configurable through Blockly's initialization options using the `move` property and its sub-properties: `scrollbars`, `drag`, and `wheel`."],["Scrollbars can be individually enabled or disabled for horizontal and vertical scrolling, while dragging and wheel scrolling are enabled or disabled with boolean values."]]],["Blockly's workspace movement is configured via the `move` object within its settings. This configuration allows defining the behavior of scrollbars, mouse dragging, and mouse wheel scrolling. `scrollbars` enables horizontal and/or vertical scrolling. `drag` enables mouse dragging, dependent on scrollbars being enabled. `wheel` enables mouse wheel scrolling, also dependent on scrollbars. Default settings include both scrollbars enabled and mouse dragging enabled, but mouse wheel disabled. If scrollbars are false then drag and wheel will be false as well.\n"]]