با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
blockly > InsertionMarkerPreviewer > previewReplacement
روش InsertionMarkerPreviewer.previewReplacement()
یک پیشنمایش اتصال را نشان دهید که در آن dragedCon به staticCon متصل میشود و جایگزین جایگزینشدهBlock (در حال حاضر به staticCon متصل است).
امضا:
previewReplacement(draggedConn: RenderedConnection, staticConn: RenderedConnection, replacedBlock: BlockSvg): void;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
draggedConn | RenderedConnection | اتصال روی پشته بلوک در حال کشیدن است. |
staticConn | RenderedConnection | اتصالی که ما به آن متصل می شویم کشیده نمی شود. |
جایگزین بلوک شد | BlockSvg | بلوک در حال حاضر به staticCon که در حال جایگزینی است متصل است. |
برمی گرداند:
باطل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-10 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-10 بهوقت ساعت هماهنگ جهانی."],[[["The `previewReplacement` method visually demonstrates how a dragged block would connect and replace an existing block within a Blockly workspace."],["It takes three arguments: the dragged block's connection point, the static connection point it might connect to, and the block that would be replaced by this connection."],["This method is crucial for providing users with a clear preview before they commit to a block connection change, improving the user experience within the Blockly editor."]]],[]]