@univerjs/engine-render v0.5.4
Class: Layer
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:27
Extends
Constructors
new Layer()
new Layer(
_scene,
objects,
_zIndex,
_allowCache): Layer
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:36
Parameters
Parameter | Type | Default value |
---|---|---|
_scene | Scene | undefined |
objects | BaseObject [] | [] |
_zIndex | number | 1 |
_allowCache | boolean | false |
Returns
Overrides
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:96 |
Accessors
scene
Get Signature
get scene(): Scene
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:51
Returns
zIndex
Get Signature
get zIndex(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:55
Returns
number
Methods
addObject()
addObject(o): Layer
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:113
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
addObjects()
addObjects(objects): Layer
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:161
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
clear()
clear(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:302
Returns
void
disableCache()
disableCache(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:64
Returns
void
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:306
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
enableCache()
enableCache(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:59
Returns
void
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
getObjects()
getObjects(): BaseObject[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:104
Returns
getObjectsByOrder()
getObjectsByOrder(): BaseObject[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:78
Get direct visible children in order. (direct means object is not in group), default order is ascending by z-index.
Returns
objects
getObjectsByOrderForPick()
getObjectsByOrderForPick(): BaseObject[]
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:93
Get visible and evented objects.
Returns
objects
isAllowCache()
isAllowCache(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:70
Returns
boolean
isDirty()
isDirty(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:215
Returns
boolean
makeDirty()
makeDirty(state): Layer
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:190
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
makeDirtyWithDebounce()
makeDirtyWithDebounce(state): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:203
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
void
removeObject()
removeObject(object): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:132
Parameters
Parameter | Type |
---|---|
object | string | BaseObject |
Returns
void
removeObjects()
removeObjects(objects): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:168
Parameters
Parameter | Type |
---|---|
objects | string [] | BaseObject [] |
Returns
void
render()
render(parentCtx?, isMaxLayer?): Layer
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:219
Parameters
Parameter | Type | Default value |
---|---|---|
parentCtx ? | UniverRenderingContext | undefined |
isMaxLayer ? | boolean | false |