Skip to main content

IRelativePosition Interface

A position specified relative to a segment. \

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here.

Signature

export interface IRelativePosition

Properties

PropertyAlertsModifiersTypeDescription
beforeBetaoptionalbooleanIf true, insert before the specified segment. If false or not defined, insert after the specified segment.
idBetaoptionalstringString identifier specifying a segment.
offsetBetaoptionalnumberA positive number >= 1. If before is false, offset is added to the position. If before is true, offset is subtracted from the position.

Property Details

before

If true, insert before the specified segment. If false or not defined, insert after the specified segment.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

before?: boolean;

Type: boolean

id

String identifier specifying a segment.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

id?: string;

Type: string

offset

A positive number >= 1. If before is false, offset is added to the position. If before is true, offset is subtracted from the position.

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

offset?: number;

Type: number