public virtual int GetNewOffset(int offset, AnchorMovementType movementType = AnchorMovementType.Default)
{
if (offset >= Offset && offset <= Offset + RemovalLength)
{
if (movementType == AnchorMovementType.BeforeInsertion)
return Offset;
return Offset + InsertionLength;
}
if (offset > Offset)
{
return offset + InsertionLength - RemovalLength;
}
return offset;
}