@univerjs/core v0.4.2 • Docs
Class: SlideDataModel
The base class for all units.
Extends
UnitModel
<ISlideData
,UniverInstanceType.UNIVER_SLIDE
>
Constructors
new SlideDataModel()
new SlideDataModel(snapshot): SlideDataModel
Parameters
Parameter | Type |
---|---|
snapshot | Partial <ISlideData > |
Returns
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:52 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | UnitModel ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
activePage$ | readonly | Observable <Nullable <ISlidePage >> | undefined | - | - | submodules/univer/packages/core/src/slides/slide-model.ts:43 (opens in a new tab) |
name$ | public | Observable <string > | undefined | UnitModel .name$ | - | submodules/univer/packages/core/src/slides/slide-model.ts:46 (opens in a new tab) |
type | public | UNIVER_SLIDE | UniverInstanceType.UNIVER_SLIDE | UnitModel .type | - | submodules/univer/packages/core/src/slides/slide-model.ts:26 (opens in a new tab) |
Methods
appendPage()
appendPage(page): void
Parameters
Parameter | Type |
---|---|
page | ISlidePage |
Returns
void
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:145 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
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)
getActivePage()
getActivePage(): Nullable<ISlidePage>
Returns
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:135 (opens in a new tab)
getBlankPage()
getBlankPage(): {
description: '';
id: string;
pageBackgroundFill: {
rgb: 'rgb(255,255,255)';
};
pageElements: {};
pageType: PageType.SLIDE;
title: id;
zIndex: 10;
}
Returns
{
description: '';
id: string;
pageBackgroundFill: {
rgb: 'rgb(255,255,255)';
};
pageElements: {};
pageType: PageType.SLIDE;
title: id;
zIndex: 10;
}
Name | Type | Default value | Defined in |
---|---|---|---|
description | string | '' | submodules/univer/packages/core/src/slides/slide-model.ts:121 (opens in a new tab) |
id | string | - | submodules/univer/packages/core/src/slides/slide-model.ts:117 (opens in a new tab) |
pageBackgroundFill | { rgb : 'rgb(255,255,255)' ; } | - | submodules/univer/packages/core/src/slides/slide-model.ts:122 (opens in a new tab) |
pageBackgroundFill.rgb | string | 'rgb(255,255,255)' | submodules/univer/packages/core/src/slides/slide-model.ts:123 (opens in a new tab) |
pageElements | {} | {} | submodules/univer/packages/core/src/slides/slide-model.ts:125 (opens in a new tab) |
pageType | PageType | PageType.SLIDE | submodules/univer/packages/core/src/slides/slide-model.ts:118 (opens in a new tab) |
title | string | id | submodules/univer/packages/core/src/slides/slide-model.ts:120 (opens in a new tab) |
zIndex | number | 10 | submodules/univer/packages/core/src/slides/slide-model.ts:119 (opens in a new tab) |
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:113 (opens in a new tab)
getElement()
getElement(pageId, elementId): undefined | IPageElement
Parameters
Parameter | Type |
---|---|
pageId | string |
elementId | string |
Returns
undefined
| IPageElement
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:105 (opens in a new tab)
getElementsByPage()
getElementsByPage(pageId): undefined | {}
Parameters
Parameter | Type |
---|---|
pageId | string |
Returns
undefined
| {}
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:101 (opens in a new tab)
getPage()
getPage(pageId): undefined | ISlidePage
Parameters
Parameter | Type |
---|---|
pageId | string |
Returns
undefined
| ISlidePage
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:96 (opens in a new tab)
getPageOrder()
getPageOrder(): undefined | string[]
Returns
undefined
| string
[]
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:92 (opens in a new tab)
getPageSize()
getPageSize(): ISize
Returns
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:109 (opens in a new tab)
getPages()
getPages(): undefined | {}
Returns
undefined
| {}
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:88 (opens in a new tab)
getRev()
getRev(): number
Get revision of the unit's snapshot. Note that revision should start from 1.
Returns
number
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:68 (opens in a new tab)
getSnapshot()
getSnapshot(): ISlideData
Returns
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:80 (opens in a new tab)
getUnitId()
getUnitId(): string
Returns
string
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:84 (opens in a new tab)
incrementRev()
incrementRev(): void
Increment the current revision.
Returns
void
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:72 (opens in a new tab)
setActivePage()
setActivePage(page): void
Parameters
Parameter | Type |
---|---|
page | Nullable <ISlidePage > |
Returns
void
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:131 (opens in a new tab)
setName()
setName(name): void
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:62 (opens in a new tab)
setRev()
setRev(_rev): void
Set revision of the current snapshot.
Parameters
Parameter | Type |
---|---|
_rev | number |
Returns
void
Overrides
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:76 (opens in a new tab)
updatePage()
updatePage(pageId, page): void
Parameters
Parameter | Type |
---|---|
pageId | string |
page | ISlidePage |
Returns
void
Defined in
submodules/univer/packages/core/src/slides/slide-model.ts:139 (opens in a new tab)