Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
blockly > blockRendering > Renderer > refreshDom
Méthode blockRendering.Renderer.refreshDom()
Actualisez le moteur de rendu après un changement de thème.
Signature :
refreshDom(svg: SVGElement, theme: Theme, injectionDivIfIsParent?: HTMLElement): void;
Paramètres
Paramètre |
Type |
Description |
svg |
SVGElement |
Racine du SVG de l'espace de travail. |
thème |
Thème |
Objet du thème de l'espace de travail. |
injectionDivIfIsParent |
HTMLElement |
(Facultatif) Div contenant l'espace de travail parent et tous les espaces de travail et conteneurs de blocs associés, si ce rendu est destiné à l'espace de travail parent. Les variables CSS représentant des modèles SVG seront limitées à ce conteneur. Les espaces de travail enfants ne doivent pas remplacer les variables CSS créées par le parent et n'ont donc pas besoin d'accéder à la div d'injection. |
Renvoie :
vide
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/05/16 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/05/16 (UTC)."],[[["Refreshes the visual representation of Blockly blocks after a theme change."],["Takes the workspace's SVG root and the new theme as input for updating the block visuals."],["The `refreshDom` method is part of the `Renderer` class within the `blockRendering` namespace in Blockly."],["This method is crucial for applying visual changes immediately after a theme is altered, ensuring the workspace reflects the new style."]]],["The `refreshDom` method updates the renderer following a theme modification. It accepts two parameters: `svg`, which is the root SVG element of the workspace, and `theme`, which represents the new workspace theme. This method ensures the rendering reflects the current theme settings. The method returns no value (void).\n"]]