با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
blockly > DeleteArea
کلاس DeleteArea
کلاس انتزاعی برای مؤلفهای که میتواند بلوک یا حبابی را که در بالای آن رها شده است حذف کند.
امضا:
export declare class DeleteArea extends DragTarget implements IDeleteArea
گسترش می یابد: DragTarget
پیاده سازی: IDeleteArea
سازندگان
سازنده | اصلاح کننده ها | توضیحات |
---|
(سازنده)() | | سازنده برای DeleteArea. نباید مستقیماً فراخوانی شود، فقط توسط یک زیر کلاس. |
خواص
اموال | اصلاح کننده ها | تایپ کنید | توضیحات |
---|
شناسه | | رشته | شناسه منحصر به فرد این مؤلفه که برای ثبت نام در ComponentManager استفاده می شود. |
حذف می کردم_ | protected | بولی | آیا آخرین بلوک یا حباب کشیده شده روی این ناحیه حذف، در صورت انداختن روی این مؤلفه، حذف خواهد شد. این ویژگی پس از حذف بلوک یا حباب به روز نمی شود. |
روش ها
روش | اصلاح کننده ها | توضیحات |
---|
updateWouldDelete_(wildDelete) | protected | وضعیت داخلی wouldDelete_ را به روز می کند. |
حذف (عنصر) | | نشان می دهد که اگر بلوک یا حباب ارائه شده در این ناحیه حذف شود یا خیر. این روش باید بررسی کند که آیا عنصر قابل حذف است و همیشه قبل از onDragEnter/onDragOver/onDragExit فراخوانی می شود. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی."],[[["The `DeleteArea` class in Blockly manages the deletion of blocks or bubbles dropped onto it."],["It's an abstract class extending `DragTarget` and implementing `IDeleteArea`, meant to be subclassed."],["It uses a `wouldDelete_` property to track if a dragged element would be deleted upon release."],["The `wouldDelete` method determines if a given element is deletable when dragged over the area."],["It provides `updateWouldDelete_` to manage the internal deletion state."]]],["The `DeleteArea` class, extending `DragTarget` and implementing `IDeleteArea`, manages the deletion of blocks or bubbles. It features a constructor and properties like `id` and `wouldDelete_`, the later tracking whether a dragged element would be deleted if dropped. Key methods include `updateWouldDelete_`, which manages the `wouldDelete_` state, and `wouldDelete`, determining if a dragged element is deletable. This class does not allow being directly instantiated, only used through subclasses.\n"]]