@univerjs/engine-render v0.4.2 • 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
submodules/univer/packages/engine-render/src/layer.ts:36 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_dirty | protected | boolean | true | - | submodules/univer/packages/engine-render/src/layer.ts:32 (opens in a new tab) |
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab) |
Accessors
scene
get scene(): Scene
Returns
Defined in
submodules/univer/packages/engine-render/src/layer.ts:51 (opens in a new tab)
zIndex
get zIndex(): number
Returns
number
Defined in
submodules/univer/packages/engine-render/src/layer.ts:55 (opens in a new tab)
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
submodules/univer/packages/engine-render/src/layer.ts:113 (opens in a new tab)
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
submodules/univer/packages/engine-render/src/layer.ts:161 (opens in a new tab)
clear()
clear(): void
Returns
void
Defined in
submodules/univer/packages/engine-render/src/layer.ts:303 (opens in a new tab)
disableCache()
disableCache(): void
Returns
void
Defined in
submodules/univer/packages/engine-render/src/layer.ts:64 (opens in a new tab)
dispose()
dispose(): void
Returns
void
Overrides
Defined in
submodules/univer/packages/engine-render/src/layer.ts:307 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
enableCache()
enableCache(): void
Returns
void
Defined in
submodules/univer/packages/engine-render/src/layer.ts:59 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)
getObjects()
getObjects(): BaseObject[]
Returns
Defined in
submodules/univer/packages/engine-render/src/layer.ts:104 (opens in a new tab)
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
submodules/univer/packages/engine-render/src/layer.ts:78 (opens in a new tab)
getObjectsByOrderForPick()
getObjectsByOrderForPick(): BaseObject[]
Get visible and evented objects.
Returns
objects
Defined in
submodules/univer/packages/engine-render/src/layer.ts:93 (opens in a new tab)
isAllowCache()
isAllowCache(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-render/src/layer.ts:70 (opens in a new tab)
isDirty()
isDirty(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-render/src/layer.ts:216 (opens in a new tab)
makeDirty()
makeDirty(state): Layer
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
Defined in
submodules/univer/packages/engine-render/src/layer.ts:190 (opens in a new tab)
makeDirtyWithDebounce()
makeDirtyWithDebounce(state): void
Parameters
Parameter | Type | Default value |
---|---|---|
state | boolean | true |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/layer.ts:204 (opens in a new tab)
removeObject()
removeObject(object): void
Parameters
Parameter | Type |
---|---|
object | string | BaseObject |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/layer.ts:132 (opens in a new tab)
removeObjects()
removeObjects(objects): void
Parameters
Parameter | Type |
---|---|
objects | string [] | BaseObject [] |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/layer.ts:168 (opens in a new tab)
render()
render(parentCtx?, isMaxLayer?): Layer
Parameters
Parameter | Type | Default value |
---|---|---|
parentCtx ? | UniverRenderingContext | undefined |
isMaxLayer ? | boolean | false |
Returns
Defined in
submodules/univer/packages/engine-render/src/layer.ts:220 (opens in a new tab)