Show: Inherited Protected Private Deprecated

# WidgetInteractionPoint Class

Defined in: `src/ui/react/src/components/base/widget-interaction-point.js:4`

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

## Index

### Methods

- _getXPoint
- _getYPoint
- getInteractionPoint

### Properties

- editorEvent

## Methods

### `_getXPoint`

(

- `selectionData`
- `eventX`

)
Number protected

Defined in `src/ui/react/src/components/base/widget-interaction-point.js:95`

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

Defined in `src/ui/react/src/components/base/widget-interaction-point.js:129`

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

Defined in `src/ui/react/src/components/base/widget-interaction-point.js:20`

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

Defined in `src/ui/react/src/components/base/widget-interaction-point.js:12`

The provided editor event.