Packages > @fluidframework/merge-tree > IRelativePosition

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

Property Alerts Modifiers Type Description
before Alpha optional boolean If true, insert before the specified segment. If false or not defined, insert after the specified segment.
id Alpha optional string String identifier specifying a segment.
offset Alpha optional number A 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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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

Signature

offset?: number;

Type: number