@univerjscoreclassesSlidedatamodel

@univerjs/core v0.5.4


Class: SlideDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:25

The base class for all units.

Extends

Constructors

new SlideDataModel()

new SlideDataModel(snapshot): SlideDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:52

Parameters

ParameterType
snapshotPartial<ISlideData>

Returns

SlideDataModel

Overrides

UnitModel.constructor

Properties

PropertyModifierTypeDefault valueOverridesInherited fromDefined in
_disposedprotectedbooleanfalse-UnitModel._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
activePage$readonlyObservable<Nullable<ISlidePage>>undefined--packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:43
name$publicObservable<string>undefinedUnitModel.name$-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:46
typepublicUNIVER_SLIDEUniverInstanceType.UNIVER_SLIDEUnitModel.type-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:26

Methods

appendPage()

appendPage(page): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:145

Parameters

ParameterType
pageISlidePage

Returns

void


dispose()

dispose(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:109

Returns

void

Inherited from

UnitModel.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

UnitModel.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

UnitModel.ensureNotDisposed


getActivePage()

getActivePage(): Nullable<ISlidePage>

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:135

Returns

Nullable<ISlidePage>


getBlankPage()

getBlankPage(): {
  description: string;
  id: string;
  pageBackgroundFill: {
     rgb: string;
    };
  pageElements: {};
  pageType: PageType;
  title: string;
  zIndex: number;
}

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:113

Returns

{
  description: string;
  id: string;
  pageBackgroundFill: {
     rgb: string;
    };
  pageElements: {};
  pageType: PageType;
  title: string;
  zIndex: number;
}
NameTypeDefault valueDefined in
descriptionstringpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:121
idstring-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:117
pageBackgroundFill{ rgb: string; }-packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:122
pageBackgroundFill.rgbstring’rgb(255,255,255)‘packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:123
pageElements{}{}packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:125
pageTypePageTypePageType.SLIDEpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:118
titlestringidpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:120
zIndexnumber10packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:119

getElement()

getElement(pageId, elementId): undefined | IPageElement

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:105

Parameters

ParameterType
pageIdstring
elementIdstring

Returns

undefined | IPageElement


getElementsByPage()

getElementsByPage(pageId): undefined | {}

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:101

Parameters

ParameterType
pageIdstring

Returns

undefined | {}


getPage()

getPage(pageId): undefined | ISlidePage

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:96

Parameters

ParameterType
pageIdstring

Returns

undefined | ISlidePage


getPageOrder()

getPageOrder(): undefined | string[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:92

Returns

undefined | string[]


getPages()

getPages(): undefined | {}

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:88

Returns

undefined | {}


getPageSize()

getPageSize(): ISize

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:109

Returns

ISize


getRev()

getRev(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:68

Get revision of the unit’s snapshot. Note that revision should start from 1.

Returns

number

Overrides

UnitModel.getRev


getSnapshot()

getSnapshot(): ISlideData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:80

Returns

ISlideData

Overrides

UnitModel.getSnapshot


getUnitId()

getUnitId(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:84

Returns

string

Overrides

UnitModel.getUnitId


incrementRev()

incrementRev(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:72

Increment the current revision.

Returns

void

Overrides

UnitModel.incrementRev


setActivePage()

setActivePage(page): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:131

Parameters

ParameterType
pageNullable<ISlidePage>

Returns

void


setName()

setName(name): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:62

Parameters

ParameterType
namestring

Returns

void

Overrides

UnitModel.setName


setRev()

setRev(_rev): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:76

Set revision of the current snapshot.

Parameters

ParameterType
_revnumber

Returns

void

Overrides

UnitModel.setRev


updatePage()

updatePage(pageId, page): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/slides/slide-model.ts:139

Parameters

ParameterType
pageIdstring
pageISlidePage

Returns

void