CKEDITOR.plugins.lineutils.locator
A utility that analyses relations found by CKEDITOR.plugins.lineutils.finder and locates them in the viewport as horizontal lines of specific coordinates.
Filtering
Properties
Methods
-
Creates a Locator class instance.
Parameters
editor : editor
Editor instance that Locator belongs to.
Returns
locator
-
locate( relations ) → Object
CKEDITOR.plugins.lineutils.locator#locate
Locates the Y coordinate for all types of every single relation and stores them in an object.
Parameters
relations : Object
Returns
Object
-
sort( y, [ howMany ] ) → Array
CKEDITOR.plugins.lineutils.locator#sort
Calculates distances from every location to given vertical coordinate and sorts locations according to that distance.
Parameters
y : Number
The vertical coordinate used for sorting, used as a reference.
[ howMany ] : Number
Determines the number of "closest locations" to be returned.
Returns
Array
Sorted, array representation of locations.
-
store( uid, type, y )
CKEDITOR.plugins.lineutils.locator#store
Stores the location in a collection.
Parameters
uid : Number
Unique identifier of the relation.
type : Number
One of
CKEDITOR.LINEUTILS_BEFORE
,CKEDITOR.LINEUTILS_AFTER
andCKEDITOR.LINEUTILS_INSIDE
.y : Number
Vertical position of the relation.