סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > blockRendering > Renderer > refreshDom
השיטה blockRendering.Renderer.refreshDom()
לרענן את המנגנון להצגת הגרפיקה אחרי שינוי העיצוב.
Signature:
refreshDom(svg: SVGElement, theme: Theme, injectionDivIfIsParent?: HTMLElement): void;
פרמטרים
פרמטר |
סוג |
תיאור |
svg |
SVGElement |
שורש קובץ ה-SVG של סביבת העבודה. |
עיצוב |
עיצוב |
האובייקט של עיצוב סביבת העבודה. |
injectionDivIfIsParent |
HTMLElement |
(אופציונלי) ה-div שמכיל את סביבת העבודה של ההורה ואת כל סביבות העבודה הקשורות ואת מאגרי הרכיבים, אם ה-renderer הזה מיועד לסביבת העבודה של ההורה. משתני CSS שמייצגים דפוסי SVG יהיו ברמת הקונטיינר הזה. לא צריך לשנות את משתני ה-CSS שנוצרו על ידי החשבון ההורה במרחבי העבודה הצאצאים, ולכן אין להם צורך בגישה ל-div ההזרקה. |
החזרים:
לא תקף
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-05-16 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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"]]