IIntervalCollectionEvent Interface
Change events emitted by IntervalCollection
s
To use, import via @fluidframework/sequence/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent
Extends: IEvent
Type Parameters
Parameter | Constraint | Description |
---|---|---|
TInterval | ISerializableInterval |
Call Signatures
CallSignature | Alerts | Description |
---|---|---|
(event: "changeInterval", listener: (interval: TInterval, previousInterval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): void | Alpha |
This event is invoked whenever the endpoints of an interval may have changed. This can happen on: - local endpoint modification - ack of a remote endpoint modification - position change due to segment sliding (slides due to mergeTree segment deletion will always appear local) The interval argument reflects the new values. previousInterval contains transient ReferencePosition s at the same location as the interval's original endpoints. These references should be used for position information only. local reflects whether the change originated locally. op is defined if and only if the server has acked this change. slide is true if the change is due to sliding on removal of position |
(event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void | Alpha |
This event is invoked whenever an interval is added or removed from the collection. local reflects whether the change originated locally. op is defined if and only if the server has acked this change. |
(event: "propertyChanged", listener: (interval: TInterval, propertyDeltas: PropertySet, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void | Alpha |
This event is invoked whenever an interval's properties have changed. interval reflects the state of the updated properties. propertyDeltas is a map-like whose keys contain all values that were changed, and whose values contain all previous values of the property set. This object can be used directly in a call to changeProperties to revert the property change if desired. local reflects whether the change originated locally. op is defined if and only if the server has acked this change. |
(event: "changed", listener: (interval: TInterval, propertyDeltas: PropertySet, previousInterval: TInterval | undefined, local: boolean, slide: boolean) => void): void | Alpha |
This event is invoked whenever an interval's endpoints or properties (or both) have changed. interval reflects the state of the updated endpoints or properties. propertyDeltas is a map-like whose keys contain all values that were changed, and whose values contain all previous values of the property set. This object can be used directly in a call to changeProperties to revert the property change if desired. 'previousInterval' contains transient ReferencePosition s at the same location as the interval's original endpoints. These references should be used for position information only. In the case of a property change only, this argument should be undefined. local reflects whether the change originated locally. slide is true if the change is due to sliding on removal of position. |
Call Signature Details
(event: "changeInterval", listener: (interval: TInterval, previousInterval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): void
This event is invoked whenever the endpoints of an interval may have changed. This can happen on: - local endpoint modification - ack of a remote endpoint modification - position change due to segment sliding (slides due to mergeTree segment deletion will always appear local) The interval
argument reflects the new values. previousInterval
contains transient ReferencePosition
s at the same location as the interval's original endpoints. These references should be used for position information only. local
reflects whether the change originated locally. op
is defined if and only if the server has acked this change. slide
is true if the change is due to sliding on removal of position
To use, import via @fluidframework/sequence/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "changeInterval", listener: (interval: TInterval, previousInterval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): void;
(event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void
This event is invoked whenever an interval is added or removed from the collection. local
reflects whether the change originated locally. op
is defined if and only if the server has acked this change.
To use, import via @fluidframework/sequence/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void;
(event: "propertyChanged", listener: (interval: TInterval, propertyDeltas: PropertySet, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void
This event is invoked whenever an interval's properties have changed. interval
reflects the state of the updated properties. propertyDeltas
is a map-like whose keys contain all values that were changed, and whose values contain all previous values of the property set. This object can be used directly in a call to changeProperties
to revert the property change if desired. local
reflects whether the change originated locally. op
is defined if and only if the server has acked this change.
To use, import via @fluidframework/sequence/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "propertyChanged", listener: (interval: TInterval, propertyDeltas: PropertySet, local: boolean, op: ISequencedDocumentMessage | undefined) => void): void;
(event: "changed", listener: (interval: TInterval, propertyDeltas: PropertySet, previousInterval: TInterval | undefined, local: boolean, slide: boolean) => void): void
This event is invoked whenever an interval's endpoints or properties (or both) have changed. interval
reflects the state of the updated endpoints or properties. propertyDeltas
is a map-like whose keys contain all values that were changed, and whose values contain all previous values of the property set. This object can be used directly in a call to changeProperties
to revert the property change if desired. 'previousInterval' contains transient ReferencePosition
s at the same location as the interval's original endpoints. These references should be used for position information only. In the case of a property change only, this argument should be undefined. local
reflects whether the change originated locally. slide
is true if the change is due to sliding on removal of position.
To use, import via @fluidframework/sequence/alpha
.
For more information about our API support guarantees, see here.
Signature
(event: "changed", listener: (interval: TInterval, propertyDeltas: PropertySet, previousInterval: TInterval | undefined, local: boolean, slide: boolean) => void): void;