RichEditLayout.getPositionBounds(position) Method

Returns bounds of the specified document model's position.


    position: number,
    endOfLine?: boolean
): Rectangle


Name Type Description
position number

The position in a document model.

endOfLine boolean

true to return bounds of a position at the end of a line; false to return bounds of a position at a new line start.


Type Description

The object that contains position bounds.


The getPositionBounds method returns bounds of a document layout's position, specified by a document model's position.

If the specified document model's position is located at the end of a line, this position matches two document layout's positions, at the end of a line and at the start of a new line. In this case, use the endOfLine parameter to specify the position whose bounds should be returned.

The returned rectangle object's height and coordinates match the cursor that will be displayed at this position (the Rectangle.width property returns 0).

See Also