blockly > IDragTarget > shouldPreventMove
متد IDragTarget.shouldPreventMove()
نشان می دهد که آیا بلوک یا حباب ارائه شده نباید پس از انداختن روی این مؤلفه جابجا شود یا خیر. اگر درست باشد، عنصر به جایی که در زمان شروع کشیدن بود برمی گردد.
امضا:
shouldPreventMove(dragElement: IDraggable): boolean;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
dragElement | قابل کشش | بلوک یا حباب در حال حاضر در حال کشیدن است. |
برمیگرداند:
بولی
آیا بلوک یا حباب ارائه شده باید برای شروع کشیدن بازگردانده شود.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-08 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-08 بهوقت ساعت هماهنگ جهانی."],[[["The `shouldPreventMove` method determines if a dragged block or bubble should be prevented from moving to a new location when dropped on this target."],["It takes an `IDraggable` element (the block or bubble being dragged) as input and returns `true` if the element should revert to its original position, otherwise `false`."],["This method is part of the `IDragTarget` interface in Blockly, which defines components that can interact with dragged elements."]]],[]]