Perseus
    Preparing search index...

    Hierarchy

    Index

    Constructors

    • Parameters

      Returns KeypadInput

    • Parameters

      Returns KeypadInput

    Properties

    _container: HTMLDivElement
    _containerBounds: ClientRect
    _handleScroll: () => void = ...
    _hideCursorHandle: () => void = ...
    _isMounted: boolean | null | undefined
    _mathContainer: any
    _root: any
    _updateCursorHandle: (animateIntoPosition?: boolean) => void = ...
    _updateInputPadding: () => void = ...
    blur: () => void = ...
    blurOnClickOutside: (e: any) => void
    blurOnTouchEndOutside: (e: any) => void

    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.

    static contextType = MyContext
    // For TS pre-3.7:
    context!: React.ContextType<typeof MyContext>
    // For TS 3.7 and above:
    declare context: React.ContextType<typeof MyContext>
    didScroll: boolean | null | undefined
    didTouchOutside: boolean | null | undefined
    domKeyToMathQuillKey: (key: string) => string | null | undefined = ...
    dragListener: any
    focus: (setKeypadActive: (keypadActive: boolean) => void) => void = ...
    getBorderWidthPx: () => number = ...
    getInputInnerPadding: () => {
        paddingBottom: number;
        paddingLeft: number;
        paddingRight: number;
        paddingTop: number;
    } = ...
    handleKeyUp: (e: KeyboardEvent<HTMLDivElement>) => void = ...
    handleTouchEnd: (e: TouchEvent<Element>) => void = ...
    handleTouchMove: (e: TouchEvent<Element>) => void = ...
    inputRef: HTMLDivElement | null | undefined
    mathField: any
    onCursorHandleTouchCancel: (e: TouchEvent<HTMLSpanElement>) => void = ...

    If the gesture is cancelled mid-drag, simply hide it.

    Type Declaration

      • (e: TouchEvent<HTMLSpanElement>): void
      • Parameters

        • e: TouchEvent<HTMLSpanElement>

          the raw touch event from the browser

        Returns void

    onCursorHandleTouchEnd: (e: TouchEvent<HTMLSpanElement>) => void = ...

    When the user releases the cursor handle, animate it back into place.

    Type Declaration

      • (e: TouchEvent<HTMLSpanElement>): void
      • Parameters

        • e: TouchEvent<HTMLSpanElement>

          the raw touch event from the browser

        Returns void

    onCursorHandleTouchMove: (e: TouchEvent<HTMLSpanElement>) => void = ...

    When the user moves the cursor handle update the position of the cursor and the handle.

    Type Declaration

      • (e: TouchEvent<HTMLSpanElement>): void
      • Parameters

        • e: TouchEvent<HTMLSpanElement>

          the raw touch event from the browser

        Returns void

    onCursorHandleTouchStart: (e: TouchEvent<HTMLSpanElement>) => void = ...

    When a touch starts in the cursor handle, we track it so as to avoid handling any touch events ourself.

    Type Declaration

      • (e: TouchEvent<HTMLSpanElement>): void
      • Parameters

        • e: TouchEvent<HTMLSpanElement>

          the raw touch event from the browser

        Returns void

    recordTouchStartOutside: (e: any) => void
    state: State = ...
    contextType: Context<I18nContextType> = MathInputI18nContext

    If set, this.context will be set at runtime to the current value of the given Context.

    type MyContext = number
    const Ctx = React.createContext<MyContext>(0)

    class Foo extends React.Component {
    static contextType = Ctx
    context!: React.ContextType<typeof Ctx>
    render () {
    return <>My context's value: {this.context}</>;
    }
    }
    defaultProps: DefaultProps = ...

    Methods

    • Tries 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.

      Parameters

      • containerBounds: ClientRect

        bounds of the container node

      • x: number

        the initial x coordinate in the viewport

      • y: number

        the initial y coordinate in the viewport

      • dx: number

        horizontal spacing between elementFromPoint calls

      • dy: number

        vertical spacing between elementFromPoint calls, sign determines direction.

      Returns boolean

      • true if a node was hit, false otherwise.
    • Inserts the cursor at the DOM node closest to the given coordinates, based on hit-tests conducted using #_findHitNode.

      Parameters

      • x: number

        the x coordinate in the viewport

      • y: number

        the y coordinate in the viewport

      Returns void

    • 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.

      Returns void

    • Parameters

      • e: MouseEvent
      • keypadActive: boolean
      • setKeypadActive: (keypadActive: boolean) => void

      Returns void

    • Parameters

      • e: TouchEvent<Element>
      • keypadActive: boolean
      • setKeypadActive: (keypadActive: boolean) => void

      Returns void