रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
ब्लॉकली > DragTarget > shouldPreventMove
खींचेTarget.ChooseMove() तरीके का इस्तेमाल करें
यह जानकारी देता है कि इस कॉम्पोनेंट पर छोड़ने के बाद, दिए गए ब्लॉक या बबल को दूसरी जगह नहीं ले जाया जाना चाहिए या नहीं. अगर सही है, तो एलिमेंट वहां पर पहुंच जाएगा जहां वह खींचना शुरू करते समय था.
हस्ताक्षर:
shouldPreventMove(_dragElement: IDraggable): boolean;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
_dragElement |
IDraggable |
ब्लॉक या बबल को खींचकर अभी छोड़ा जा रहा है. |
लौटाए जाने वाले प्रॉडक्ट:
बूलियन
ड्रैग स्टार्ट के लिए, दिया गया ब्लॉक या बबल लौटाया जाना चाहिए या नहीं.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-08-21 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-08-21 (UTC) को अपडेट किया गया."],[[["The `shouldPreventMove` method determines if a dragged block or bubble should be prevented from moving to a new location after being dropped on this component."],["This method accepts an `IDraggable` object representing the currently dragged element and returns `true` if the element should revert to its original position, otherwise `false`."]]],["The `shouldPreventMove()` method determines if a dragged block or bubble should return to its starting position after being dropped. It accepts an `IDraggable` element (the dragged block or bubble) as input. The method then returns a boolean value: `true` if the element should return to its original location, and `false` if the move is allowed. This controls whether the drag operation is considered successful.\n"]]