Stay organized with collections
Save and categorize content based on your preferences.
blockly > IConnectionChecker
IConnectionChecker interface
Class for connection type checking logic.
Signature:
export interface IConnectionChecker
Methods
Method |
Description |
canConnect(a, b, isDragging, opt_distance) |
Check whether the current connection can connect with the target connection. |
canConnectWithReason(a, b, isDragging, opt_distance) |
Checks whether the current connection can connect with the target connection, and return an error code if there are problems. |
doDragChecks(a, b, distance) |
Check whether this connection can be made by dragging. |
doSafetyChecks(a, b) |
Check that connecting the given connections is safe, meaning that it would not break any of Blockly's basic assumptions (e.g. no self connections). |
doTypeChecks(a, b) |
Check whether this connection is compatible with another connection with respect to the value type system. E.g. square_root("Hello") is not compatible. |
getErrorMessage(errorCode, a, b) |
Helper method that translates a connection error code into a string. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-18 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."]]