סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > IDragStrategy
ממשק IDragStrategy
Signature:
export interface IDragStrategy
שיטות
שיטה |
תיאור |
drag(newLoc, e) |
מטפל בהעברת רכיבים למיקום החדש ועדכון הרכיבים החזותיים בהתאם (למשל, תצוגות מקדימות של חיבורים לבלוקים). |
endDrag(e) |
מטפל בכל פעולת ניקוי שקשורה לגרירה, כולל למשל קישור או מחיקה של בלוקים. |
isMovable() |
הפונקציה מחזירה את הערך true אם הרכיב ניתן להזזה כרגע. |
revertDrag() |
מזיז את פריט הגרירה בחזרה למיקום שבו הוא היה בתחילת הגרירה. |
startDrag(e) |
מטפל בכל הפעלה באמצעות גרירה (למשל, העברת רכיבים לחזית של סביבת העבודה). |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-12 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-12 (שעון UTC)."],[[["The `IDragStrategy` interface defines methods for managing the dragging behavior of elements, such as blocks, within a Blockly workspace."],["It includes methods for initiating, handling, and concluding drag operations, as well as reverting to the original position if necessary."],["The interface handles visual updates during the drag, like connection previews, and ensures elements are moved and cleaned up appropriately."],["`IDragStrategy` determines the movability of elements and enables the execution of specific actions based on drag events."]]],[]]