Class: TextRange
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:95
Implements
Constructors
new TextRange()
new TextRange(
_scene,
_document,
_docSkeleton,
anchorNodePosition?,
focusNodePosition?,
style?,
_segmentId?,
_segmentPage?): TextRange
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:108
Parameters
Parameter | Type | Default value |
---|---|---|
_scene | Scene | undefined |
_document | Documents | undefined |
_docSkeleton | DocumentSkeleton | undefined |
anchorNodePosition ? | Nullable <INodePosition > | undefined |
focusNodePosition ? | Nullable <INodePosition > | undefined |
style ? | ITextSelectionStyle | NORMAL_TEXT_SELECTION_PLUGIN_STYLE |
_segmentId ? | string | '' |
_segmentPage ? | number | -1 |
Returns
Properties
Property | Modifier | Type | Default value | Defined in |
---|---|---|---|---|
anchorNodePosition? | public | Nullable <INodePosition > | undefined | submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:112 |
focusNodePosition? | public | Nullable <INodePosition > | undefined | submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:113 |
rangeType | public | DOC_RANGE_TYPE | DOC_RANGE_TYPE.TEXT | submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:96 |
style | public | ITextSelectionStyle | NORMAL_TEXT_SELECTION_PLUGIN_STYLE | submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:114 |
Accessors
collapsed
Get Signature
get collapsed(): boolean
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:181
Returns
boolean
Implementation of
direction
Get Signature
get direction(): RANGE_DIRECTION
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:215
Returns
Implementation of
endNodePosition
Get Signature
get endNodePosition(): Nullable<INodePosition>
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:201
Returns
Implementation of
endOffset
Get Signature
get endOffset(): undefined | number
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:164
Returns
undefined
| number
Implementation of
segmentId
Get Signature
get segmentId(): string
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:227
Returns
string
Implementation of
segmentPage
Get Signature
get segmentPage(): number
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:231
Returns
number
Implementation of
startNodePosition
Get Signature
get startNodePosition():
| null
| INodePosition
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:187
Returns
| null
| INodePosition
Implementation of
startOffset
Get Signature
get startOffset(): undefined | number
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:146
Returns
undefined
| number
Implementation of
Methods
activate()
activate(): void
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:302
Returns
void
activeStatic()
activeStatic(): void
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:286
Returns
void
deactivate()
deactivate(): void
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:306
Returns
void
deactivateStatic()
deactivateStatic(): void
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:292
Returns
void
dispose()
dispose(): void
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:310
Returns
void
Implementation of
getAbsolutePosition()
getAbsolutePosition():
| undefined
| {
height: number;
left: number;
top: number;
width: number;
}
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:235
Returns
| undefined
| {
height
: number
;
left
: number
;
top
: number
;
width
: number
;
}
getAnchor()
getAnchor(): Nullable<Rect>
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:282
Returns
isActive()
isActive(): boolean
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:298
Returns
boolean
Implementation of
isIntersection()
isIntersection(compareRange): boolean
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:322
Parameters
Parameter | Type |
---|---|
compareRange | TextRange |
Returns
boolean
refresh()
refresh(): void
Defined in: submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:334
Returns
void