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

Property Alerts Modifiers Type Description
callbacks Alpha optional Partial<Record<"beforeSlide" | "afterSlide", (ref: LocalReferencePosition) => void>>
canSlideToEndpoint Alpha optional, readonly boolean Whether or not this reference position can slide onto one of the two special segments representing the position before or after the tree
trackingCollection Alpha readonly TrackingGroupCollection

Methods

Method Alerts Return Type Description
addProperties(newProps) Alpha void

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.

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
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.

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
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.

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
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.

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
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

Parameter Type Description
newProps PropertySet Properties to add to this reference.