Skip to content

ChangeDesc.mapPos method

ChangeDesc › mapPos

Official

Map a given position through these changes.

Signature:

mapPos(pos: number, assoc?: number | undefined): number

Parameters:

Parameter Type Description
pos number The position to map.
assoc? number | undefined Which side the position is associated with.

Returns: numberThe mapped position.


Official

Map a given position through these changes with a specific mode.

Signature:

mapPos(pos: number, assoc: number, mode: MapMode): null | number

Parameters:

Parameter Type Description
pos number The position to map.
assoc number Which side the position is associated with.
mode MapMode The mapping mode.

Returns: null | numberThe mapped position, or null if deleted.