रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
blockly > IDragStrategy
IDragStrategy इंटरफ़ेस
हस्ताक्षर:
export interface IDragStrategy
तरीके
तरीका |
ब्यौरा |
खींचें(newLoc, e) |
यह एलिमेंट, एक से दूसरी जगह जाने वाले एलिमेंट को नई जगह पर ले जाता है और उसके आधार पर किसी भी विज़ुअल को अपडेट करता है.जैसे, ब्लॉक के लिए कनेक्शन की झलक. |
endDrag(e) |
ड्रैग क्लीनअप, जैसे कि जोड़ने या हटाने की सुविधा देता है. |
isMovable() |
अगर एलिमेंट को फ़िलहाल एक जगह से दूसरी जगह ले जाया जा सकता है, तो 'सही' दिखाता है. |
revertDrag() |
खींचे जाने वाले आइटम को वापस उस जगह पर ले जाता है जहां से उसे खींचा गया था. |
startDrag(e) |
ड्रैग स्टार्टअप को हैंडल करता है (जैसे, फ़ाइल फ़ोल्डर के सामने ले जाने वाले एलिमेंट). |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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."]]],["The `IDragStrategy` interface defines methods for managing drag operations. Key actions include: `drag`, which moves elements and updates visuals; `endDrag`, which finalizes the drag, connecting or deleting elements; `startDrag`, which initiates the drag; `revertDrag`, which returns elements to their original position; and `isMovable`, which checks if an element can be moved. These methods collectively control the lifecycle and behavior of draggable elements within the system.\n"]]