調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >InsertionMarkerPreviewer >previewReplacement
InsertionMarkerPreviewer.previewReplacement() メソッド
DraggedCon が staticCon に接続する接続プレビューを表示し、replaceBlock(現在は staticCon に接続されている)を置き換えます。
署名:
previewReplacement(draggedConn: RenderedConnection, staticConn: RenderedConnection, replacedBlock: BlockSvg): void;
パラメータ
パラメータ |
型 |
説明 |
draggedConn |
RenderedConnection |
ドラッグされているブロック スタック上の接続。 |
staticConn |
RenderedConnection |
接続先の接続がドラッグされていません。 |
replacedBlock |
BlockSvg |
置き換えられる staticCon に現在接続されているブロック。 |
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-08 UTC。
[null,null,["最終更新日 2024-09-08 UTC。"],[[["The `previewReplacement` method visually demonstrates how a dragged block would connect and replace an existing block within a Blockly workspace."],["It takes three arguments: the dragged block's connection point, the static connection point it might connect to, and the block that would be replaced by this connection."],["This method is crucial for providing users with a clear preview before they commit to a block connection change, improving the user experience within the Blockly editor."]]],[]]