Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > blockRendering > InputConnection
Klasa podstawowa reprezentująca dane wejściowe, które podczas renderowania zajmują miejsce na bloku.
Podpis:
export declare class InputConnection extends Connection
Rozszerza: Połączenie
Zespoły
Właściwości
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003e\u003ccode\u003eInputConnection\u003c/code\u003e is the base class for rendering inputs on Blockly blocks, extending the \u003ccode\u003eConnection\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eIt manages the visual representation and connection logic of block inputs.\u003c/p\u003e\n"],["\u003cp\u003eIncludes properties for alignment, connected blocks, and connection offsets.\u003c/p\u003e\n"],["\u003cp\u003eConstructed with connection constants and an \u003ccode\u003eInput\u003c/code\u003e object.\u003c/p\u003e\n"]]],["The `InputConnection` class, extending `Connection`, represents an input on a block during rendering. It's instantiated with a constructor that takes `constants` and `input`. Key properties include: `align` (a number), `connectedBlock` (a `BlockSvg` or null), `connectedBlockHeight` and `connectedBlockWidth` (numbers), `connectionOffsetX` and `connectionOffsetY` (numbers), and `input` (an `Input`). These properties define how the input connects to other blocks and its dimensions during the rendering process.\n"],null,["[blockly](./blockly.md) \\\u003e [blockRendering](./blockly.blockrendering_namespace.md) \\\u003e [InputConnection](./blockly.blockrendering_namespace.inputconnection_class.md)\n\nblockRendering.InputConnection class\n------------------------------------\n\nThe base class to represent an input that takes up space on a block during rendering.\n\n**Signature:** \n\n export declare class InputConnection extends Connection \n\n**Extends:** [Connection](./blockly.blockrendering_namespace.connection_class.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|----------------------------------------------------------------------------------------------------------------------------|-----------|----------------------------------------------------------|\n| [(constructor)(constants, input)](./blockly.blockrendering_namespace.inputconnection_class._constructor__1_constructor.md) | | Constructs a new instance of the `InputConnection` class |\n\nProperties\n----------\n\n| Property | Modifiers | Type | Description |\n|-------------------------------------------------------------------------------------------------------------------|-----------|-------------------------------------------------|-------------|\n| [align](./blockly.blockrendering_namespace.inputconnection_class.align_property.md) | | number | |\n| [connectedBlock](./blockly.blockrendering_namespace.inputconnection_class.connectedblock_property.md) | | [BlockSvg](./blockly.blocksvg_class.md) \\| null | |\n| [connectedBlockHeight](./blockly.blockrendering_namespace.inputconnection_class.connectedblockheight_property.md) | | number | |\n| [connectedBlockWidth](./blockly.blockrendering_namespace.inputconnection_class.connectedblockwidth_property.md) | | number | |\n| [connectionOffsetX](./blockly.blockrendering_namespace.inputconnection_class.connectionoffsetx_property.md) | | number | |\n| [connectionOffsetY](./blockly.blockrendering_namespace.inputconnection_class.connectionoffsety_property.md) | | number | |\n| [input](./blockly.blockrendering_namespace.inputconnection_class.input_property.md) | | [Input](./blockly.input_class.md) | |"]]