@univerjs/docs-ui v0.5.0-beta.1 • Docs
Class: TextRange
Implements
Constructors
new TextRange()
new TextRange(
_scene,
_document,
_docSkeleton,
anchorNodePosition?,
focusNodePosition?,
style?,
_segmentId?,
_segmentPage?): TextRange
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
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:108
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
Returns
boolean
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:181
direction
Get Signature
get direction(): RANGE_DIRECTION
Returns
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:215
endNodePosition
Get Signature
get endNodePosition(): Nullable<INodePosition>
Returns
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:201
endOffset
Get Signature
get endOffset(): undefined | number
Returns
undefined
| number
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:164
segmentId
Get Signature
get segmentId(): string
Returns
string
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:227
segmentPage
Get Signature
get segmentPage(): number
Returns
number
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:231
startNodePosition
Get Signature
get startNodePosition(): null | INodePosition
Returns
null
| INodePosition
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:187
startOffset
Get Signature
get startOffset(): undefined | number
Returns
undefined
| number
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:146
Methods
activate()
activate(): void
Returns
void
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:302
activeStatic()
activeStatic(): void
Returns
void
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:286
deactivate()
deactivate(): void
Returns
void
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:306
deactivateStatic()
deactivateStatic(): void
Returns
void
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:292
dispose()
dispose(): void
Returns
void
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:310
getAbsolutePosition()
getAbsolutePosition(): undefined | {
height: number;
left: number;
top: number;
width: number;
}
Returns
undefined
| {
height
: number
;
left
: number
;
top
: number
;
width
: number
;
}
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:235
getAnchor()
getAnchor(): Nullable<Rect<IRectProps>>
Returns
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:282
isActive()
isActive(): boolean
Returns
boolean
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:298
isIntersection()
isIntersection(compareRange): boolean
Parameters
Parameter | Type |
---|---|
compareRange | TextRange |
Returns
boolean
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:322
refresh()
refresh(): void
Returns
void
Implementation of
Defined in
submodules/univer/packages/docs-ui/src/services/selection/text-range.ts:334