Module

widget/widgetresize/resizerstate

@ckeditor/ckeditor5-widget/src/widgetresize/resizerstate

module

Filtering

Classes

  • ResizeState

    Stores the internal state of a single resizable object.

Functions

  • getAbsoluteBoundaryPoint( element, resizerPosition ) → Object

    private

    Returns coordinates of the top-left corner of an element, relative to the document's top-left corner.

    Parameters

    element : HTMLElement
    resizerPosition : String

    The position of the resize handle, e.g. "top-left", "bottom-right".

    Returns

    Object

    return

    Number

    return.x

    Number

    return.y

  • getHandlePosition( domHandle ) → String | undefined

    private

    Determines the position of a given resize handle.

    Parameters

    domHandle : HTMLElement

    Handler used to calculate the reference point.

    Returns

    String | undefined

    Returns a string like "top-left" or undefined if not matched.

  • getOppositePosition( position ) → String

    Parameters

    position : String

    Like "top-left".

    Returns

    String

    Inverted position, e.g. it returns "bottom-right" if "top-left" was given as position.

  • getResizerHandleClass( resizerPosition ) → String

    private

    Parameters

    resizerPosition : String

    The expected resizer position, like "top-left", "bottom-right".

    Returns

    String

    A prefixed HTML class name for the resizer element.