Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
blockly > blockRendering > PathObject > updateShapeForInputHighlight
Aggiungi o rimuovi lo stile che indica che, se il blocco di trascinamento viene eliminato, questo blocco verrà collegato all'input.
Firma:
updateShapeForInputHighlight(_conn: Connection, _enable: boolean): void;
Parametri
Parametro |
Tipo |
Descrizione |
_conn |
Connessione |
La connessione sull'ingresso da evidenziare. |
_enable |
booleano |
True se è necessario aggiungere uno stile. |
Resi:
null
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-25 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"]]