@univerjs/engine-render v0.5.0-beta.1 • Docs


Class: DocumentSkeleton

Extends

Constructors

new DocumentSkeleton()

new DocumentSkeleton(_docViewModel, localeService): DocumentSkeleton

Parameters

ParameterType
_docViewModelDocumentViewModel
localeServiceLocaleService

Returns

DocumentSkeleton

Overrides

Skeleton.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:128

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseSkeleton._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
_localeServicereadonlyLocaleServiceundefinedSkeleton._localeServicepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/skeleton.ts:25
dirty$readonlyObservable<boolean>undefined-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:115

Accessors

dirty

Get Signature

get dirty(): boolean
Returns

boolean

Inherited from

Skeleton.dirty

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/skeleton.ts:31

Methods

calculate()

calculate(bounds?): void

Layout the document. PS: This method has significant impact on performance.

Parameters

ParameterType
bounds?IViewportInfo

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:154


dispose()

dispose(): void

Returns

void

Overrides

Skeleton.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:139


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Skeleton.disposeWithMe

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Skeleton.ensureNotDisposed

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100


findCharIndexByPosition()

findCharIndexByPosition(position): Nullable<number>

Parameters

ParameterType
positionINodePosition

Returns

Nullable<number>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:276


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
editAreaDocumentEditAreapackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:426
pageNullable<IDocumentSkeletonPage>packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:428
pageNumbernumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:427

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:420


findGlyphByPosition()

findGlyphByPosition(position): undefined | IDocumentSkeletonGlyph

Parameters

ParameterType
positionNullable<INodePosition>

Returns

undefined | IDocumentSkeletonGlyph

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:362


findNodeByCharIndex()

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

Parameters

ParameterTypeDefault value
charIndexnumberundefined
segmentIdstring''
segmentPageIndexnumber-1

Returns

Nullable<IDocumentSkeletonGlyph>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:356


findNodeByCoord()

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

Parameters

ParameterType
coordVector2
pageLayoutTypePageLayoutType
pageMarginLeftnumber
pageMarginTopnumber
restrictions?IFindNodeRestrictions

Returns

Nullable<INodeInfo>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:493


findNodePositionByCharIndex()

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

Parameters

ParameterTypeDefault value
charIndexnumberundefined
isBackbooleantrue
segmentIdstring''
segmentPIndexnumber-1

Returns

Nullable<INodePosition>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:299


findPositionByGlyph()

findPositionByGlyph(glyph, segmentPage): Nullable<INodeSearch>

Parameters

ParameterType
glyphIDocumentSkeletonGlyph
segmentPagenumber

Returns

Nullable<INodeSearch>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:213


getActualSize()

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

Returns

{
  actualHeight: number;
  actualWidth: number;
}
NameTypeDefined in
actualHeightnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:186
actualWidthnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:185

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:171


getFontLocale()

getFontLocale(): IFontLocale

Returns

IFontLocale

Inherited from

Skeleton.getFontLocale

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/skeleton.ts:35


getPageSize()

getPageSize(): undefined | ISize

Returns

undefined | ISize

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:209


getSkeletonData()

getSkeletonData(): Nullable<IDocumentSkeletonCached>

Returns

Nullable<IDocumentSkeletonCached>

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:167


getViewModel()

getViewModel(): DocumentViewModel

Returns

DocumentViewModel

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:146


makeDirty()

makeDirty(state): void

Parameters

ParameterType
stateboolean

Returns

void

Inherited from

Skeleton.makeDirty

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/skeleton.ts:39


create()

static create(docViewModel, localeService): DocumentSkeleton

Parameters

ParameterType
docViewModelDocumentViewModel
localeServiceLocaleService

Returns

DocumentSkeleton

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/components/docs/layout/doc-skeleton.ts:135