Skip to main content

LocalReferencePosition Interface

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.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature

/** @sealed */
export interface LocalReferencePosition extends ReferencePosition

Extends: ReferencePosition

Properties

PropertyAlertsModifiersTypeDescription
callbacksBetaoptionalPartial<Record<"beforeSlide" | "afterSlide", (ref: LocalReferencePosition) => void>>
canSlideToEndpointBetaoptional, readonlybooleanWhether or not this reference position can slide onto one of the two special segments representing the position before or after the tree
trackingCollectionBetareadonlyTrackingGroupCollection

Methods

MethodAlertsReturn TypeDescription
addProperties(newProps)Betavoid

Property Details

callbacks

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

callbacks?: Partial<Record<"beforeSlide" | "afterSlide", (ref: LocalReferencePosition) => void>>;

Type: Partial<Record<"beforeSlide" | "afterSlide", (ref: LocalReferencePosition) => void>>

canSlideToEndpoint

Whether or not this reference position can slide onto one of the two special segments representing the position before or after the tree

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

readonly canSlideToEndpoint?: boolean;

Type: boolean

trackingCollection

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

readonly trackingCollection: TrackingGroupCollection;

Type: TrackingGroupCollection

Method Details

addProperties

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

addProperties(newProps: PropertySet): void;

Remarks

Note that merge-tree does not broadcast changes to other clients. It is up to the consumer to ensure broadcast happens if that is desired.

Parameters

ParameterTypeDescription
newPropsPropertySetProperties to add to this reference.