blockly > Touch
Touch namespace
Functions
Function |
Description |
checkTouchIdentifier(e) |
Check whether the pointer identifier on the event matches the current saved identifier. If the current identifier was unset, save the identifier from the event. This starts a drag/gesture, during which pointer events with other identifiers will be silently ignored. |
clearTouchIdentifier() |
Clear the touch identifier that tracks which touch stream to pay attention to. This ends the current drag/gesture and allows other pointers to be captured. |
getTouchIdentifierFromEvent(e) |
Get the pointer identifier from the given event. |
shouldHandleEvent(e) |
Decide whether Blockly should handle or ignore this event. Mouse and touch events require special checks because we only want to deal with one touch stream at a time. All other events should always be handled. |
Variables
Variable |
Description |
TOUCH_ENABLED |
Whether touch is enabled in the browser. Copied from Closure's goog.events.BrowserFeature.TOUCH_ENABLED |
TOUCH_MAP |
The TOUCH_MAP lookup dictionary specifies additional touch events to fire, in conjunction with mouse events. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 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."]]],[]]