If using the new style context, re-declare this in your class to be the
React.ContextType of your static contextType.
Should be used with type annotation or static contextType.
If the gesture is cancelled mid-drag, simply hide it.
the raw touch event from the browser
When the user releases the cursor handle, animate it back into place.
the raw touch event from the browser
When the user moves the cursor handle update the position of the cursor and the handle.
the raw touch event from the browser
When a touch starts in the cursor handle, we track it so as to avoid handling any touch events ourself.
the raw touch event from the browser
StaticcontextIf set, this.context will be set at runtime to the current value of the given Context.
StaticdefaultTries to determine which DOM node to place the cursor next to based on where the user drags the cursor handle. If it finds a node it will place the cursor next to it, update the handle to be under the cursor, and return true. If it doesn't find a node, it returns false.
It searches for nodes by doing it tests at the following points:
(x - dx, y), (x, y), (x + dx, y)
If it doesn't find any nodes from the rendered math it will update y by adding dy.
The algorithm ends its search when y goes outside the bounds of containerBounds.
bounds of the container node
the initial x coordinate in the viewport
the initial y coordinate in the viewport
horizontal spacing between elementFromPoint calls
vertical spacing between elementFromPoint calls, sign determines direction.
Returns the current bounds of the keypadElement
Inserts the cursor at the DOM node closest to the given coordinates, based on hit-tests conducted using #_findHitNode.
the x coordinate in the viewport
the y coordinate in the viewport
Called immediately after a component is mounted. Setting state here will trigger re-rendering.
Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
cancelled network requests, or cleaning up any DOM elements created in componentDidMount.
Deprecated
See
React Docs