@univerjs/engine-render v0.4.2 • Docs
Class: DocumentSkeleton
Extends
Constructors
new DocumentSkeleton()
new DocumentSkeleton(_docViewModel, localeService): DocumentSkeleton
Parameters
Parameter | Type |
---|---|
_docViewModel | DocumentViewModel |
localeService | LocaleService |
Returns
Overrides
Defined in
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Skeleton ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
_localService | readonly | LocaleService | undefined | Skeleton ._localService | submodules/univer/packages/engine-render/src/components/skeleton.ts:26 (opens in a new tab) |
dirty$ | readonly | Observable <boolean > | undefined | - | submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:115 (opens in a new tab) |
Accessors
dirty
get dirty(): boolean
Returns
boolean
Inherited from
Defined in
submodules/univer/packages/engine-render/src/components/skeleton.ts:32 (opens in a new tab)
Methods
calculate()
calculate(bounds?): void
Layout the document. PS: This method has significant impact on performance.
Parameters
Parameter | Type |
---|---|
bounds ? | IViewportInfo |
Returns
void
Defined in
dispose()
dispose(): void
Returns
void
Overrides
Defined in
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
findCharIndexByPosition()
findCharIndexByPosition(position): Nullable<number>
Parameters
Parameter | Type |
---|---|
position | INodePosition |
Returns
Nullable
<number
>
Defined in
findEditAreaByCoord()
findEditAreaByCoord(
coord,
pageLayoutType,
pageMarginLeft,
pageMarginTop): {
editArea: DocumentEditArea;
page: Nullable<IDocumentSkeletonPage>;
pageNumber: number;
}
Parameters
Parameter | Type |
---|---|
coord | Vector2 |
pageLayoutType | PageLayoutType |
pageMarginLeft | number |
pageMarginTop | number |
Returns
{
editArea: DocumentEditArea;
page: Nullable<IDocumentSkeletonPage>;
pageNumber: number;
}
Defined in
findGlyphByPosition()
findGlyphByPosition(position): undefined | IDocumentSkeletonGlyph
Parameters
Parameter | Type |
---|---|
position | Nullable <INodePosition > |
Returns
undefined
| IDocumentSkeletonGlyph
Defined in
findNodeByCharIndex()
findNodeByCharIndex(
charIndex,
segmentId,
segmentPageIndex): Nullable<IDocumentSkeletonGlyph>
Parameters
Parameter | Type | Default value |
---|---|---|
charIndex | number | undefined |
segmentId | string | '' |
segmentPageIndex | number | -1 |
Returns
Nullable
<IDocumentSkeletonGlyph
>
Defined in
findNodeByCoord()
findNodeByCoord(
coord,
pageLayoutType,
pageMarginLeft,
pageMarginTop,
restrictions?): Nullable<INodeInfo>
Parameters
Parameter | Type |
---|---|
coord | Vector2 |
pageLayoutType | PageLayoutType |
pageMarginLeft | number |
pageMarginTop | number |
restrictions ? | IFindNodeRestrictions |
Returns
Defined in
findNodePositionByCharIndex()
findNodePositionByCharIndex(
charIndex,
isBack,
segmentId,
segmentPIndex): Nullable<INodePosition>
Parameters
Parameter | Type | Default value |
---|---|---|
charIndex | number | undefined |
isBack | boolean | true |
segmentId | string | '' |
segmentPIndex | number | -1 |
Returns
Defined in
findPositionByGlyph()
findPositionByGlyph(glyph, segmentPage): Nullable<INodeSearch>
Parameters
Parameter | Type |
---|---|
glyph | IDocumentSkeletonGlyph |
segmentPage | number |
Returns
Defined in
getActualSize()
getActualSize(): {
actualHeight: number;
actualWidth: number;
}
Returns
{
actualHeight: number;
actualWidth: number;
}
Defined in
getFontLocale()
getFontLocale(): IFontLocale
Returns
Inherited from
Defined in
submodules/univer/packages/engine-render/src/components/skeleton.ts:36 (opens in a new tab)
getPageSize()
getPageSize(): undefined | ISize
Returns
undefined
| ISize
Defined in
getSkeletonData()
getSkeletonData(): Nullable<IDocumentSkeletonCached>
Returns
Nullable
<IDocumentSkeletonCached
>
Defined in
getViewModel()
getViewModel(): DocumentViewModel
Returns
Defined in
makeDirty()
makeDirty(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Inherited from
Defined in
submodules/univer/packages/engine-render/src/components/skeleton.ts:40 (opens in a new tab)
create()
static create(docViewModel, localeService): DocumentSkeleton
Parameters
Parameter | Type |
---|---|
docViewModel | DocumentViewModel |
localeService | LocaleService |