封鎖 >blockRendering >顯示器 >refreshDom
blockRendering.Renderer.refreshDom() 方法
主題變更後重新整理轉譯器。
Signature:
refreshDom(svg: SVGElement, theme: Theme): void;
參數
參數 |
類型 |
說明 |
svg |
SVGElement |
工作區 SVG 的根。 |
主題 |
主題 |
工作區主題物件。 |
傳回:
void
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-21 (世界標準時間)。
[null,null,["上次更新時間:2024-08-21 (世界標準時間)。"],[[["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"]]