Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > IConnectionPreviewer > previewReplacement
Metode IConnectionPreviewer.previewReplacement()
Tampilkan pratinjau koneksi tempat draggedCon tersambung ke staticCon, menggantikan ReplaceBlock (saat ini tersambung ke staticCon).
Tanda Tangan:
previewReplacement(draggedConn: RenderedConnection, staticConn: RenderedConnection, replacedBlock: BlockSvg): void;
Parameter
Parameter |
Jenis |
Deskripsi |
draggedConn |
RenderedConnection |
|
staticConn |
RenderedConnection |
|
replacedBlock |
BlockSvg |
Blok yang saat ini terhubung ke staticCon yang sedang diganti. |
Hasil:
void
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-08-21 UTC.
[null,null,["Terakhir diperbarui pada 2024-08-21 UTC."],[[["The `previewReplacement` method visually displays how a dragged connection would connect to a static connection, replacing an existing block."],["It takes three parameters: the dragged connection, the static connection, and the block being replaced."],["This method is part of the `IConnectionPreviewer` interface and doesn't return any value."]]],["The `previewReplacement` method, part of the `IConnectionPreviewer` interface, shows a connection preview. This preview illustrates how a `draggedConn` would connect to a `staticConn`, effectively replacing a `replacedBlock` that is currently connected to the `staticConn`. The method takes three parameters: `draggedConn` (the connection being dragged), `staticConn` (the stationary connection), and `replacedBlock` (the block being replaced). The method returns void.\n"]]