Blockly は 2025 年 11 月 10 日に Raspberry Pi Foundation に移行しました。ブログ投稿とよくある質問をご覧ください。
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ブロックする >フライアウト >isDragTowardWorkspace
Flyout.isDragTowardWorkspace() メソッド
フライアウトの位置と向きに基づいて、ドラッグの差分がワークスペースに向かっているかどうかを判断します。これは、新しいブロックを作成するのか、フライアウトをスクロールするのかを判断するために、decidDragIntention_ で使用されます。
署名:
abstract isDragTowardWorkspace(currentDragDeltaXY: Coordinate): boolean;
パラメータ
| パラメータ |
型 |
説明 |
| currentDragDeltaXY |
座標 |
マウスダウンの位置からポインタが移動した距離(ピクセル単位)。 |
戻り値:
ブール値
ドラッグがワークスペースの方向である場合は true。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],["The `isDragTowardWorkspace()` method, part of the Flyout class, assesses if a drag movement is directed toward the workspace. It takes a `currentDragDeltaXY` (pixel movement) as input. Based on the flyout's position and orientation, it returns `true` if the drag is toward the workspace, `false` otherwise. This determination guides whether a new block should be generated or if the flyout should scroll. The return value is a boolean.\n"]]