blockly > DragTarget > shouldPreventMove
طريقة DragTarget.preventMove()
تعرض ما إذا كان يجب عدم نقل القالب أو الفقاعة التفسيرية المقدّمَين بعد إسقاطهما على هذا المكوّن. إذا كانت القيمة true، فسيعود العنصر إلى حيث كان عند بدء السحب.
Signature:
shouldPreventMove(_dragElement: IDraggable): boolean;
المعلمات
المعلمة |
النوع |
الوصف |
_dragElement |
IDraggable |
القالب أو الفقاعة التفسيرية التي يتم سحبها حاليًا. |
المرتجعات:
منطقي
ما إذا كان يجب إرجاع الكتلة أو الفقاعة التفسيرية لبداية السحب.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]