研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
blockly >blockRendering >InputConnection
表示在渲染期间占用块空间的输入的基类。
Signature:
export declare class InputConnection extends Connection
扩展: 连接
构造函数
属性
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\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) | |"]]