blockly > Touch

Touch namespace


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.


Variable Description
TOUCH_ENABLED Whether touch is enabled in the browser. Copied from Closure's
TOUCH_MAP The TOUCH_MAP lookup dictionary specifies additional touch events to fire, in conjunction with mouse events.