Report an issue
Class

CKEDITOR.plugins.lineutils.locator

class private

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

  • since 4.3.0

    constructor( editor ) → locator

    Creates a Locator class instance.

    Parameters

    editor : editor

    Editor instance that Locator belongs to.

    Returns

    locator
  • locate( relations ) → Object

    Locates the Y coordinate for all types of every single relation and stores them in an object.

    Parameters

    relations : Object

    CKEDITOR.plugins.lineutils.finder.relations.

    Returns

    Object

    locations.

  • sort( y, [ howMany ] ) → Array

    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 )

    Stores the location in a collection.

    Parameters

    uid : Number

    Unique identifier of the relation.

    type : Number

    One of CKEDITOR.LINEUTILS_BEFORE, CKEDITOR.LINEUTILS_AFTER and CKEDITOR.LINEUTILS_INSIDE.

    y : Number

    Vertical position of the relation.