API Reference
@univerjs
@univerjs/engine-render
classes
Documentskeleton

@univerjs/engine-render v0.4.2Docs


Class: DocumentSkeleton

Extends

Constructors

new DocumentSkeleton()

new DocumentSkeleton(_docViewModel, localeService): DocumentSkeleton

Parameters

ParameterType
_docViewModelDocumentViewModel
localeServiceLocaleService

Returns

DocumentSkeleton

Overrides

Skeleton.constructor

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:128 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseSkeleton._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
_localServicereadonlyLocaleServiceundefinedSkeleton._localServicesubmodules/univer/packages/engine-render/src/components/skeleton.ts:26 (opens in a new tab)
dirty$readonlyObservable<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

Skeleton.dirty

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

ParameterType
bounds?IViewportInfo

Returns

void

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:154 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Overrides

Skeleton.dispose

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:139 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Skeleton.disposeWithMe

Defined in

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


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Skeleton.ensureNotDisposed

Defined in

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


findCharIndexByPosition()

findCharIndexByPosition(position): Nullable<number>

Parameters

ParameterType
positionINodePosition

Returns

Nullable<number>

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:276 (opens in a new tab)


findEditAreaByCoord()

findEditAreaByCoord(
   coord, 
   pageLayoutType, 
   pageMarginLeft, 
   pageMarginTop): {
  editArea: DocumentEditArea;
  page: Nullable<IDocumentSkeletonPage>;
  pageNumber: number;
}

Parameters

ParameterType
coordVector2
pageLayoutTypePageLayoutType
pageMarginLeftnumber
pageMarginTopnumber

Returns

{
  editArea: DocumentEditArea;
  page: Nullable<IDocumentSkeletonPage>;
  pageNumber: number;
}
NameTypeDefined in
editAreaDocumentEditAreasubmodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:426 (opens in a new tab)
pageNullable<IDocumentSkeletonPage>submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:428 (opens in a new tab)
pageNumbernumbersubmodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:427 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:420 (opens in a new tab)


findGlyphByPosition()

findGlyphByPosition(position): undefined | IDocumentSkeletonGlyph

Parameters

ParameterType
positionNullable<INodePosition>

Returns

undefined | IDocumentSkeletonGlyph

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:362 (opens in a new tab)


findNodeByCharIndex()

findNodeByCharIndex(
   charIndex, 
   segmentId, 
segmentPageIndex): Nullable<IDocumentSkeletonGlyph>

Parameters

ParameterTypeDefault value
charIndexnumberundefined
segmentIdstring''
segmentPageIndexnumber-1

Returns

Nullable<IDocumentSkeletonGlyph>

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:356 (opens in a new tab)


findNodeByCoord()

findNodeByCoord(
   coord, 
   pageLayoutType, 
   pageMarginLeft, 
   pageMarginTop, 
restrictions?): Nullable<INodeInfo>

Parameters

ParameterType
coordVector2
pageLayoutTypePageLayoutType
pageMarginLeftnumber
pageMarginTopnumber
restrictions?IFindNodeRestrictions

Returns

Nullable<INodeInfo>

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:493 (opens in a new tab)


findNodePositionByCharIndex()

findNodePositionByCharIndex(
   charIndex, 
   isBack, 
   segmentId, 
segmentPIndex): Nullable<INodePosition>

Parameters

ParameterTypeDefault value
charIndexnumberundefined
isBackbooleantrue
segmentIdstring''
segmentPIndexnumber-1

Returns

Nullable<INodePosition>

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:299 (opens in a new tab)


findPositionByGlyph()

findPositionByGlyph(glyph, segmentPage): Nullable<INodeSearch>

Parameters

ParameterType
glyphIDocumentSkeletonGlyph
segmentPagenumber

Returns

Nullable<INodeSearch>

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:213 (opens in a new tab)


getActualSize()

getActualSize(): {
  actualHeight: number;
  actualWidth: number;
}

Returns

{
  actualHeight: number;
  actualWidth: number;
}
NameTypeDefined in
actualHeightnumbersubmodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:186 (opens in a new tab)
actualWidthnumbersubmodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:185 (opens in a new tab)

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:171 (opens in a new tab)


getFontLocale()

getFontLocale(): IFontLocale

Returns

IFontLocale

Inherited from

Skeleton.getFontLocale

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

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:209 (opens in a new tab)


getSkeletonData()

getSkeletonData(): Nullable<IDocumentSkeletonCached>

Returns

Nullable<IDocumentSkeletonCached>

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:167 (opens in a new tab)


getViewModel()

getViewModel(): DocumentViewModel

Returns

DocumentViewModel

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:146 (opens in a new tab)


makeDirty()

makeDirty(state): void

Parameters

ParameterType
stateboolean

Returns

void

Inherited from

Skeleton.makeDirty

Defined in

submodules/univer/packages/engine-render/src/components/skeleton.ts:40 (opens in a new tab)


create()

static create(docViewModel, localeService): DocumentSkeleton

Parameters

ParameterType
docViewModelDocumentViewModel
localeServiceLocaleService

Returns

DocumentSkeleton

Defined in

submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:135 (opens in a new tab)


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