blockly > browserEvents

browserEvents namespace


Function Description
bind(node, name, thisObject, func) Bind an event handler that should be called regardless of whether it is part of the active touch stream. Use this for events that are not part of a multi-part gesture (e.g. mouseover for tooltips).
conditionalBind(node, name, thisObject, func, opt_noCaptureIdentifier) Bind an event handler that can be ignored if it is not part of the active touch stream. Use this for events that either start or continue a multi-part gesture (e.g. mousedown or mousemove, which may be part of a drag or click).
getScrollDeltaPixels(e) Returns the scroll delta of a mouse event in pixel units.
isRightButton(e) Returns true this event is a right-click.
isTargetInput(e) Returns true if this event is targeting a text input widget?
mouseToSvg(e, svg, matrix) Returns the converted coordinates of the given mouse event. The origin (0,0) is the top-left corner of the Blockly SVG.
unbind(bindData) Unbind one or more events event from a function call.

Type Aliases

Type Alias Description
Data Blockly opaque event data used to unbind events when using bind and conditionalBind.