@univerjs/engine-render v0.5.4
Class: RenderUnit
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:59
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
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:79
Parameters
Parameter | Type |
---|---|
init | Pick <IRenderContext , "unit" | "scene" | "engine" | "isMainScene" > |
parentInjector | Injector |
Returns
Overrides
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:96 |
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>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:77
Returns
Map
<string
, RenderComponentType
>
Implementation of
engine
Get Signature
get engine(): Engine
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:72
Returns
Set Signature
set engine(engine): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:71
Parameters
Parameter | Type |
---|---|
engine | Engine |
Returns
void
Implementation of
isMainScene
Get Signature
get isMainScene(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:70
Returns
boolean
Set Signature
set isMainScene(is): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:69
Parameters
Parameter | Type |
---|---|
is | boolean |
Returns
void
Implementation of
mainComponent
Get Signature
get mainComponent(): Nullable<RenderComponentType>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:74
Returns
Set Signature
set mainComponent(component): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:73
Parameters
Parameter | Type |
---|---|
component | Nullable <RenderComponentType > |
Returns
void
Implementation of
scene
Get Signature
get scene(): Scene
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:76
Returns
Set Signature
set scene(scene): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:75
Parameters
Parameter | Type |
---|---|
scene | Scene |
Returns
void
Implementation of
type
Get Signature
get type(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:63
Returns
number
Implementation of
unitId
Get Signature
get unitId(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:62
The id of the RenderUnit.
Returns
string
The id of the RenderUnit.
Implementation of
Methods
addRenderDependencies()
addRenderDependencies(dependencies): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:115
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
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:99
Returns
void
Overrides
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
with()
with<T>(dependency): T
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/render-manager/render-unit.ts:107
Get a dependency from the RenderUnit’s injector.
Type Parameters
Type Parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
dependency | DependencyIdentifier <T > |
Returns
T