@univerjs/engine-render v0.5.0-beta.1 • Docs
Class: Layer
Extends
Constructors
new Layer()
new Layer(
_scene,
objects,
_zIndex,
_allowCache): Layer
Parameters
Parameter | Type | Default value |
---|---|---|
_scene | Scene | undefined |
objects | BaseObject [] | [] |
_zIndex | number | 1 |
_allowCache | boolean | false |
Returns
Overrides
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:36
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_dirty | protected | boolean | true | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:32 |
_disposed | protected | boolean | false | Disposable ._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
Accessors
scene
Get Signature
get scene(): Scene
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:51
zIndex
Get Signature
get zIndex(): number
Returns
number
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:55
Methods
addObject()
addObject(o): Layer
Insert object to this._objects, if object is a group, insert all its children and group itself to _objects[]
Parameters
Parameter | Type |
---|---|
o | BaseObject |
Returns
this
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:113
addObjects()
addObjects(objects): Layer
Insert objects to this._objects, if object is a group, insert all its children and group itself to _objects[]
Parameters
Parameter | Type |
---|---|
objects | BaseObject [] |
Returns
this
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:161
clear()
clear(): void
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:303
disableCache()
disableCache(): void
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:64
dispose()
dispose(): void
Returns
void
Overrides
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:307
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
enableCache()
enableCache(): void
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:59
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100
getObjects()
getObjects(): BaseObject[]
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:104
getObjectsByOrder()
getObjectsByOrder(): BaseObject[]
Get direct visible children in order. (direct means object is not in group), default order is ascending by z-index.
Returns
objects
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:78
getObjectsByOrderForPick()
getObjectsByOrderForPick(): BaseObject[]
Get visible and evented objects.
Returns
objects
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:93
isAllowCache()
isAllowCache(): boolean
Returns
boolean
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:70
isDirty()
isDirty(): boolean
Returns
boolean
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:216
makeDirty()
makeDirty(state): Layer
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:190
makeDirtyWithDebounce()
makeDirtyWithDebounce(state): void
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:204
removeObject()
removeObject(object): void
Parameters
Parameter | Type |
---|---|
object | string | BaseObject |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:132
removeObjects()
removeObjects(objects): void
Parameters
Parameter | Type |
---|---|
objects | string [] | BaseObject [] |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:168
render()
render(parentCtx?, isMaxLayer?): Layer
Parameters
Parameter | Type | Default value |
---|---|---|
parentCtx ? | UniverRenderingContext | undefined |
isMaxLayer ? | boolean | false |
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:220