blockly > blockRendering > MarkerSvg > setParent_
Metodo blockRendering.MarkerSvg.setParent_()
Collega la radice SVG dell'indicatore al gruppo SVG dell'elemento principale.
Firma:
protected setParent_(newParent: IASTNodeLocationSvg): void;
Parametri
Parametro |
Tipo |
Descrizione |
newParent |
IASTNodeLocationSvg |
L'area di lavoro, il campo o il blocco a cui deve essere allegato l'elemento SVG dell'indicatore. |
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 2024-10-15 UTC.
[null,null,["Ultimo aggiornamento 2024-10-15 UTC."],[[["The `blockRendering.MarkerSvg.setParent_()` method attaches the marker's SVG root to its parent's SVG group."],["It takes one argument: `newParent`, which represents the location (workspace, field, or block) where the marker should be attached."],["This method is used internally for managing the visual representation of markers within Blockly and doesn't return any value."]]],["The `setParent_()` method within the `MarkerSvg` class attaches the marker's SVG root to a specified parent's SVG group. It accepts one parameter, `newParent`, which is of type `IASTNodeLocationSvg`. This parameter represents the workspace, field, or block that the marker's SVG element will be attached to. The method returns void, indicating no explicit return value. The main action is to connect the marker's visual representation to the visual element of the parent.\n"]]