Stay organized with collections
Save and categorize content based on your preferences.
blockly > ConnectionDB > removeConnection
ConnectionDB.removeConnection() method
Remove a connection from the database. Must already exist in DB.
Signature:
removeConnection(connection: RenderedConnection, yPos: number): void;
Parameters
Parameter |
Type |
Description |
connection |
RenderedConnection |
The connection to be removed. |
yPos |
number |
The y position used to find the index of the connection. |
Returns:
void
Exceptions
{Error} If the connection cannot be found in the database.
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.
[[["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."],[[["The `removeConnection` method is used to remove a specific connection from the ConnectionDB."],["In order to remove a connection, it must already exist in the database."],["To use this method, you must provide the `RenderedConnection` object and its y position (`yPos`) for database lookup."],["If the provided connection is not found in the database, it will throw an error."]]],["The `removeConnection` method within the `ConnectionDB` class removes a specified `RenderedConnection` from the database. It requires the connection to exist and uses a `yPos` number to locate its index. The method takes the connection and its y-position as parameters. Upon successful removal, the method returns void. An error is thrown if the connection cannot be found.\n"]]