סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > ISelectable
ממשק ISelectable
הממשק של אובייקט שאפשר לבחור.
באופן כללי, ההטמעות אמורות להשתמש בהטמעות שלהן של onNodeFocus() ו-onNodeBlur() כדי לקרוא ל-setSelected() עם עצמן ועם null, בהתאמה, כדי להבטיח שהבחירות יעודכנו בצורה נכונה ושהאירוע של שינוי הבחירה יופעל.
Signature:
export interface ISelectable extends IFocusableNode
ממשיכה: IFocusableNode
מאפיינים
Methods
שיטה |
תיאור |
select() |
בוחרים באפשרות הזו. להדגיש אותו באופן ויזואלי. |
unselect() |
מבטלים את הבחירה באפשרות הזו. להסיר את ההדגשה החזותית שלו. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון 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-07-25 (שעון UTC)."],[[["The ISelectable interface defines objects that can be selected and unselected within a Blockly workspace."],["It includes properties for the object's ID and its associated workspace."],["Objects implementing this interface have methods for visual selection and deselection."]]],["The `ISelectable` interface defines objects that can be selected within a workspace. It mandates the presence of an `id` (string) and a `workspace` property of `Workspace` type. Key actions include `select()`, which visually highlights the object, and `unselect()`, which removes the visual highlight. These methods control the visual state of the selectable object within its designated workspace.\n"]]