סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > סביבת עבודה > isCapacityAvailable
שיטת Workspace.isCapacityAvailable()
בודקים אם יש קיבולת לבלוקים של הספירות הנתונות שאפשר ליצור. אם המספר הכולל של הבלוקים שהמפה מייצג גדול מהקיבולת הכוללת שנותרה, הפונקציה מחזירה את הערך False. אם מספר הסוגים גדול מהקיבולת שנותרה לסוג הזה, הפונקציה מחזירה את הערך False.
Signature:
isCapacityAvailable(typeCountsMap: {
[key: string]: number;
}): boolean;
פרמטרים
פרמטר |
סוג |
תיאור |
typeCountsMap |
{ [key: string]: number; } |
מפה של סוגים לספירה (בדרך כלל מייצגים בלוקים שיש ליצור). |
החזרות:
בוליאני
הערך הוא True אם יש קיבולת למפה הנתונה, אחרת False.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-10-15 (שעון UTC).
[null,null,["עדכון אחרון: 2024-10-15 (שעון UTC)."],[[["The `isCapacityAvailable` method checks if a Blockly workspace has enough capacity to create new blocks based on the provided type and count."],["It returns `false` if the total number of blocks or the count of a specific block type exceeds the defined capacity, otherwise it returns `true`."],["The method uses a `typeCountsMap` parameter to specify the types and counts of blocks intended for creation."]]],[]]