Stay organized with collections Save and categorize content based on your preferences.

blockly > Touch > checkTouchIdentifier

Touch.checkTouchIdentifier() function

Check whether the touch identifier on the event matches the current saved identifier. If there is no identifier, that means it's a mouse event and we'll use the identifier "mouse". This means we won't deal well with multiple mice being used at the same time. That seems okay. If the current identifier was unset, save the identifier from the event. This starts a drag/gesture, during which touch events with other identifiers will be silently ignored.

Signature:

export declare function checkTouchIdentifier(e: Event | PseudoEvent): boolean;

Parameters

Parameter Type Description
e Event | PseudoEvent Mouse event or touch event.

Returns:

boolean

Whether the identifier on the event matches the current saved identifier.