Show:

Provides functionality for calculating the point of interaction of the user with the Editor.

Methods

_getXPoint

(
  • selectionData
  • eventX
)
Number protected

Returns the position of the Widget.

Parameters:

  • selectionData Object

    The data about the selection in the editor as returned from getSelectionData

  • eventX Object

    The X coordinate received from the native event (mouseup).

Returns:

Number:

The calculated X point in page coordinates.

_getYPoint

(
  • selectionData
  • nativeEvent
)
Number protected

Returns the position of the Widget.

Parameters:

  • selectionData Object

    The data about the selection in the editor as returned from getSelectionData

  • nativeEvent Object

    The data about event is fired

Returns:

Number:

The calculated Y point in page coordinates.

getInteractionPoint

() Object

Returns the position, in page coordinates, according to which a widget should appear. Depending on the direction of the selection, the wdiget may appear above of or on bottom of the selection.

It depends on the props editorEvent to analyze the following user-interaction parameters:

  • {Object} selectionData The data about the selection in the editor as returned from getSelectionData
  • {Number} pos Contains the coordinates of the position, considered as most appropriate. This may be the point where the user released the mouse, or just the beginning or the end of the selection.

Returns:

Object:

An Object which contains the following properties: direction, x, y, where x and y are in page coordinates and direction can be one of these: CKEDITOR.SELECTION_BOTTOM_TO_TOP or CKEDITOR.SELECTION_TOP_TO_BOTTOM

Properties

editorEvent

SyntheticEvent

The provided editor event.