סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
ספק קבוע
השדה ConstantProvider
הוא אוסף של מספרי קסם, צורות ומחרוזות שמשמשות את כל רכיבי הרינדור האחרים, וגם חלקים אחרים ב-Blockly, כמו השדות המובנים.
כל הערכים הקבועים הם קבועים! שינוי הערכים בזמן הריצה גורם לבאגים בעיבוד.
צורות חיבור
הספק הקבוע מכיל הגדרות לצורות סטנדרטיות של חיבורים
שונים. ההגדרות Notch
מגדירות את הצורות של החיבורים הבאים והקודם. ותגי PuzzleTab
מגדירים את הצורות של חיבורי קלט ופלט. (השמות האלה מבוססים על הצורות שסופקו על ידי הכלי לעיבוד שמוגדר כברירת מחדל).
צורות החיבור על סמך בדיקות
הספק הקבוע יכול גם להגדיר את צורות החיבורים באופן דינמי על סמך בדיקת החיבור שלו. הפעולה הזו מתבצעת באמצעות השיטה shapeFor
.
נתיבים שונים נוספים
הספק הקבוע גם מגדיר נתיבים לחלקים שונים של הבלוק, כמו קצוות משוננים לבלוקים מכווצים.
ערכים שונים אחרים
לבסוף, הספק הקבוע גם מגדיר ערכים שונים לדברים כמו המרווח הפנימי בין אלמנטים שונים או הגובה המינימלי של שורות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-12-02 (שעון UTC).
[null,null,["עדכון אחרון: 2023-12-02 (שעון UTC)."],[[["The `ConstantProvider` stores essential values like shapes, strings, and numbers used by Blockly's rendering components."],["It defines standard shapes for different connection types, including notches for previous/next connections and puzzle tabs for input/output connections."],["Connection shapes can be dynamically determined based on connection checks using the `shapeFor` method."],["The `ConstantProvider` also defines paths for elements like collapsed block edges and various values for padding and minimum heights."],["Modifying `ConstantProvider` values during runtime is discouraged as it can lead to rendering issues."]]],["The `ConstantProvider` stores essential rendering data for Blockly, including connection shapes, paths, and values. It defines standard connection shapes like `Notch` for next/previous connections and `PuzzleTab` for input/output. The `shapeFor` method allows dynamic shape definition based on connection checks. Additionally, it defines paths for block components, like jagged edges, and values for padding and minimum row heights, ensuring consistent rendering. Changing these values at runtime will cause rendering issues.\n"]]