@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

ParameterTypeDefault value
_sceneSceneundefined
objectsBaseObject[][]
_zIndexnumber1
_allowCachebooleanfalse

Returns

Layer

Overrides

Disposable.constructor

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_dirtyprotectedbooleantrue-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:32
_disposedprotectedbooleanfalseDisposable._disposedpackages/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

Scene


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

ParameterType
oBaseObject

Returns

Layer

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

ParameterType
objectsBaseObject[]

Returns

Layer

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

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


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

Disposable.ensureNotDisposed


getObjects()

getObjects(): BaseObject[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:104

Returns

BaseObject[]


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

BaseObject[]

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

BaseObject[]

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

ParameterTypeDefault value
statebooleantrue

Returns

Layer


makeDirtyWithDebounce()

makeDirtyWithDebounce(state): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:203

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

void


removeObject()

removeObject(object): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:132

Parameters

ParameterType
objectstring | BaseObject

Returns

void


removeObjects()

removeObjects(objects): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:168

Parameters

ParameterType
objectsstring[] | 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

ParameterTypeDefault value
parentCtx?UniverRenderingContextundefined
isMaxLayer?booleanfalse

Returns

Layer