blockly > ConnectionChecker > canConnectToPrevious_
ConnectionChecker.canConnectToPrevious_() 方法
用於拖曳檢查的輔助函式。
Signature:
protected canConnectToPrevious_(a: Connection, b: Connection): boolean;
參數
參數 |
類型 |
說明 |
a |
連線 |
要檢查的連線,必須是陳述式輸入或下一個連線。 |
b |
連線 |
要檢查的附近連線,必須是先前的連線。 |
退貨:
布林值
如果允許連線,則傳回「是」;否則傳回「否」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-10-16 (世界標準時間)。
[null,null,["上次更新時間:2024-10-16 (世界標準時間)。"],[[["The `canConnectToPrevious_()` method is a helper function used for validating block connections during drag operations."],["It checks if a statement input or next connection (`a`) can be connected to a previous connection (`b`), returning `true` if the connection is allowed and `false` otherwise."],["This method is utilized within the ConnectionChecker class to ensure that only valid block connections are made during dragging."]]],[]]