@univerjs/engine-render v0.5.0-beta.1 • Docs


Class: Layer

Extends

Constructors

new Layer()

new Layer(
   _scene, 
   objects, 
   _zIndex, 
   _allowCache): Layer

Parameters

ParameterTypeDefault value
_sceneSceneundefined
objectsBaseObject[][]
_zIndexnumber1
_allowCachebooleanfalse

Returns

Layer

Overrides

Disposable.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:36

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:93

Accessors

scene

Get Signature

get scene(): Scene
Returns

Scene

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

ParameterType
oBaseObject

Returns

Layer

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

ParameterType
objectsBaseObject[]

Returns

Layer

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

Disposable.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:307


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

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

Disposable.ensureNotDisposed

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100


getObjects()

getObjects(): BaseObject[]

Returns

BaseObject[]

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

BaseObject[]

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

BaseObject[]

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

ParameterTypeDefault value
statebooleantrue

Returns

Layer

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:190


makeDirtyWithDebounce()

makeDirtyWithDebounce(state): void

Parameters

ParameterTypeDefault value
statebooleantrue

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:204


removeObject()

removeObject(object): void

Parameters

ParameterType
objectstring | BaseObject

Returns

void

Defined in

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


removeObjects()

removeObjects(objects): void

Parameters

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

ParameterTypeDefault value
parentCtx?UniverRenderingContextundefined
isMaxLayer?booleanfalse

Returns

Layer

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/layer.ts:220