RichEditLayout.getPositionBounds(position) Method
Returns bounds of the specified document model’s position.
Declaration
getPositionBounds(
position: number,
endOfLine?: boolean
): Rectangle
Parameters
Name | Type | Description |
---|---|---|
position | number | The position in a document model. |
endOfLine | boolean |
|
Returns
Type | Description |
---|---|
Rectangle | The object that contains position bounds. |
Remarks
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).