@univerjs/engine-render v0.5.0-beta.1 • Docs
Class: RenderUnit
This class is necessary for Univer to render several units in the same webpage. It encapsulates the rendering context and rendering modules for a specific unit.
Extends
Implements
Constructors
new RenderUnit()
new RenderUnit(init, parentInjector): RenderUnit
Parameters
Parameter | Type |
---|---|
init | Pick <IRenderContext <UnitModel <object , number >>, "unit" | "scene" | "engine" | "isMainScene" > |
parentInjector | Injector |
Returns
Overrides
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:79
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
isRenderUnit | readonly | boolean | true | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:60 |
Accessors
components
Get Signature
get components(): Map<string, RenderComponentType>
Returns
Map
<string
, RenderComponentType
>
Implementation of
IRender
.components
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:77
engine
Get Signature
get engine(): Engine
Returns
Set Signature
set engine(engine): void
Parameters
Parameter | Type |
---|---|
engine | Engine |
Returns
void
Implementation of
IRender
.engine
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:72
isMainScene
Get Signature
get isMainScene(): boolean
Returns
boolean
Set Signature
set isMainScene(is): void
Parameters
Parameter | Type |
---|---|
is | boolean |
Returns
void
Implementation of
IRender
.isMainScene
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:70
mainComponent
Get Signature
get mainComponent(): Nullable<RenderComponentType>
Returns
Set Signature
set mainComponent(component): void
Parameters
Parameter | Type |
---|---|
component | Nullable <RenderComponentType > |
Returns
void
Implementation of
IRender
.mainComponent
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:74
scene
Get Signature
get scene(): Scene
Returns
Set Signature
set scene(scene): void
Parameters
Parameter | Type |
---|---|
scene | Scene |
Returns
void
Implementation of
IRender
.scene
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:76
type
Get Signature
get type(): number
Returns
number
Implementation of
IRender
.type
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:63
unitId
Get Signature
get unitId(): string
The id of the RenderUnit.
Returns
string
The id of the RenderUnit.
Implementation of
IRender
.unitId
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:62
Methods
addRenderDependencies()
addRenderDependencies(dependencies): void
Add render dependencies to the RenderUnit’s injector. Note that the dependencies would be initialized immediately after being added.
Parameters
Parameter | Type |
---|---|
dependencies | Dependency [] |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:115
dispose()
dispose(): void
Returns
void
Overrides
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:99
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100
with()
with<T>(dependency): T
Get a dependency from the RenderUnit’s injector.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
dependency | DependencyIdentifier <T > |
Returns
T
Implementation of
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:107