blockly > ConnectionChecker > canConnectToPrevious_
طريقة ConnectionChecker.canConnectToPrevious_()
دالة مساعِدة للتحقّق من السحب
Signature:
protected canConnectToPrevious_(a: Connection, b: Connection): boolean;
المعلمات
المعلمة |
النوع |
الوصف |
a |
التواصل |
الاتصال المطلوب التحقق منه، والذي يجب أن يكون إدخالاً لبيان أو اتصال تالٍ. |
b |
الاتصال |
اتصال قريب المطلوب التحقّق منه، ويجب أن يكون اتصالاً سابقًا. |
المرتجعات:
منطقي
صحيح إذا كان الاتصال مسموحًا به، وخطأ في الحالات الأخرى.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-10-16 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-10-16 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `canConnectToPrevious_()` method is a helper function used for validating block connections during drag operations."],["It checks if a statement input or next connection (`a`) can be connected to a previous connection (`b`), returning `true` if the connection is allowed and `false` otherwise."],["This method is utilized within the ConnectionChecker class to ensure that only valid block connections are made during dragging."]]],["The `canConnectToPrevious_` method, part of the `ConnectionChecker` class, determines if two connections can be linked during a drag operation. It takes two `Connection` objects, 'a' and 'b', as input. 'a' must be a statement input or next connection, while 'b' must be a previous connection. The method returns `true` if a connection between the inputs is allowed and `false` otherwise. It's a helper function used specifically for drag checks.\n"]]