Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
blockly > blockRendering > Renderer > refreshDom
Método blockRendering.Renderer.refreshDom()
Atualize o renderizador após uma mudança de tema.
Signature:
refreshDom(svg: SVGElement, theme: Theme, injectionDivIfIsParent?: HTMLElement): void;
Parâmetros
Parâmetro |
Tipo |
Descrição |
svg |
SVGElement |
A raiz do SVG do espaço de trabalho. |
tema |
Tema |
O objeto de tema do espaço de trabalho. |
injectionDivIfIsParent |
HTMLElement |
(Opcional) O div que contém o espaço de trabalho pai e todos os espaços de trabalho e contêineres de blocos relacionados, se o renderizador for para o espaço de trabalho pai. As variáveis CSS que representam padrões SVG serão aplicadas a este contêiner. Os espaços de trabalho filhos não devem substituir as variáveis de CSS criadas pelo pai e, portanto, não precisam de acesso à div de injeção. |
Retorna:
void
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-05-16 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 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"]]