WidgetInteractionPoint Class
Provides functionality for calculating the point of interaction of the user with the Editor.
Methods
_getXPoint
-
selectionData
-
eventX
Returns the position of the Widget.
Parameters:
-
selectionData
ObjectThe data about the selection in the editor as returned from getSelectionData
-
eventX
ObjectThe X coordinate received from the native event (mouseup).
Returns:
The calculated X point in page coordinates.
_getYPoint
-
selectionData
-
nativeEvent
Returns the position of the Widget.
Parameters:
-
selectionData
ObjectThe data about the selection in the editor as returned from getSelectionData
-
nativeEvent
ObjectThe data about event is fired
Returns:
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:
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.