API Reference
@univerjs
@univerjs/core
functions
Getintersectrange

@univerjs/core v0.4.2Docs


Function: getIntersectRange()

function getIntersectRange(src, target): Nullable<IRange>

Computes the intersection of two ranges. If there is an overlap between the two ranges, returns a new range representing the intersection. If there is no overlap, returns null.

Parameters

ParameterTypeDescription
srcIRangeThe source range.
targetIRangeThe target range.

Returns

Nullable<IRange>

The intersected range or null if there is no intersection.

Defined in

submodules/univer/packages/core/src/shared/range.ts:268 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.