blockly > blockRendering > PathObject > updateShapeForInputHighlight
Sie können Stile hinzufügen oder entfernen, die angeben, dass dieser Block mit der Eingabe verbunden wird, wenn Sie den Ziehblock ziehen.
Unterschrift:
updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;
Parameter
Parameter |
Typ |
Beschreibung |
_conn |
Verbindung |
Die Verbindung über dem zu markierenden Eingang. |
_enable |
boolean |
„True“, wenn ein Stil hinzugefügt werden soll. |
Gibt zurück:
voidm
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-08-21 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-08-21 (UTC)."],[[["The `updateShapeForInputHighlight` method visually indicates whether a dragged block, if dropped, will connect to a specific input."],["This method modifies the appearance of a block to highlight the connection point if a connection is possible, and removes the highlight if not."],["It takes the connection point and a boolean value indicating whether to add or remove the styling as parameters."],["This method belongs to the `PathObject` class within the `blockRendering` namespace of the Blockly library."]]],["The `updateShapeForInputHighlight` method within `blockRendering.PathObject` modifies the styling of a block to indicate a potential connection. It accepts two parameters: `_conn`, a `Connection` object representing the input connection, and `_enable`, a boolean determining whether to add or remove the highlighting style. If `_enable` is true, it adds styling; otherwise, it removes it. The method's return type is void, signifying it does not return any value.\n"]]