แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บล็อก > แตะ
แตะเนมสเปซ
ฟังก์ชัน
การทำงาน |
คำอธิบาย |
checkTouchIdentifier(e) |
ตรวจสอบว่าตัวระบุตัวชี้ในเหตุการณ์ตรงกับตัวระบุที่บันทึกไว้ในปัจจุบันหรือไม่ หากไม่ได้ตั้งค่าตัวระบุปัจจุบันไว้ ให้บันทึกตัวระบุจากเหตุการณ์ การดำเนินการนี้จะเริ่มการลาก/ท่าทางสัมผัส โดยไม่สนใจเหตุการณ์ตัวชี้ที่มีตัวระบุอื่นๆ โดยไม่มีการแจ้งเตือน |
clearTouchIdentifier() |
ล้างตัวระบุการสัมผัสที่ติดตามสตรีมการแตะที่ต้องการให้ความสนใจ ซึ่งจะเป็นการสิ้นสุดการลาก/ท่าทางสัมผัสปัจจุบันและอนุญาตให้จับภาพตัวชี้อื่นๆ |
getTouchIdentifierFromEvent(e) |
ดูตัวระบุตัวชี้จากเหตุการณ์ที่ระบุ |
shouldHandleEvent(e) |
ตัดสินใจว่า Blockly ควรจัดการหรือเพิกเฉยต่อกิจกรรมนี้ กิจกรรมเกี่ยวกับเมาส์และการสัมผัสต้องมีการตรวจสอบพิเศษ เนื่องจากเราต้องการจัดการสตรีมแบบสัมผัสครั้งละ 1 รายการเท่านั้น และควรจัดการกิจกรรมอื่นๆ ทั้งหมดเสมอ |
ตัวแปร
ตัวแปร |
คำอธิบาย |
TOUCH_ENABLED |
มีการเปิดใช้การแตะในเบราว์เซอร์ไหม คัดลอกจาก goog.events.BrowserFeature.TOUCH_ENABLED ของ Closure |
TOUCH_MAP |
พจนานุกรมการค้นหา TOUCH_MAP จะระบุเหตุการณ์การแตะเพิ่มเติมที่จะเริ่มทำงาน ร่วมกับเหตุการณ์ของเมาส์ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[[["เข้าใจง่าย","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"]],["อัปเดตล่าสุด 2023-12-02 UTC"],[[["The Blockly Touch namespace manages touch interactions and gestures within the Blockly environment."],["It provides functions to track and identify touch streams, ensuring only one touch interaction is active at a time."],["The namespace includes variables for detecting touch capabilities and mapping touch events to corresponding mouse events for cross-platform compatibility."],["Developers can utilize the Touch namespace's functions to control touch behavior and integrate touch-based interactions in their Blockly applications."]]],["The Touch namespace in Blockly manages touch interactions. Key actions include checking and clearing a touch identifier to track a specific touch stream, ensuring only one drag/gesture is active. `getTouchIdentifierFromEvent` retrieves the pointer identifier, while `shouldHandleEvent` determines if an event should be processed. `TOUCH_ENABLED` indicates browser touch capability and `TOUCH_MAP` defines additional touch events related to mouse actions. These functions are for managing how Blockly handles various touch interactions.\n"]]