API Reference
@univerjs
@univerjs/ui
classes
Desktoplayoutservice

@univerjs/ui v0.1.17Docs


Class: DesktopLayoutService

This service is responsible for storing layout information of the current Univer application instance.

Extends

Implements

Constructors

new DesktopLayoutService()

new DesktopLayoutService(
   _contextService, 
   _univerInstanceService, 
   _editorService): DesktopLayoutService

Parameters

ParameterType
_contextServiceContextService
_univerInstanceServiceIUniverInstanceService
_editorServiceIEditorService

Returns

DesktopLayoutService

Overrides

Disposable.constructor

Defined in

packages/ui/src/services/layout/layout.service.ts:76 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedpackages/core/src/shared/lifecycle.ts:93 (opens in a new tab)

Accessors

isFocused

get isFocused(): boolean

Returns

boolean

Implementation of

ILayoutService.isFocused

Defined in

packages/ui/src/services/layout/layout.service.ts:67 (opens in a new tab)


rootContainerElement

get rootContainerElement(): Nullable<HTMLElement>

Returns

Nullable<HTMLElement>

Implementation of

ILayoutService.rootContainerElement

Defined in

packages/ui/src/services/layout/layout.service.ts:87 (opens in a new tab)

Methods

checkCanvasIsFocused()

checkCanvasIsFocused(): boolean

Returns

boolean

Implementation of

ILayoutService.checkCanvasIsFocused

Defined in

packages/ui/src/services/layout/layout.service.ts:160 (opens in a new tab)


checkElementInCurrentContainers()

checkElementInCurrentContainers(element): boolean

Parameters

ParameterType
elementHTMLElement

Returns

boolean

Implementation of

ILayoutService.checkElementInCurrentContainers

Defined in

packages/ui/src/services/layout/layout.service.ts:156 (opens in a new tab)


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)


disposeWithMe()

protected disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


focus()

focus(): void

Re-focus the currently focused Univer business instance.

Returns

void

Implementation of

ILayoutService.focus

Defined in

packages/ui/src/services/layout/layout.service.ts:91 (opens in a new tab)


getCanvasElement()

getCanvasElement(): HTMLCanvasElement

Returns

HTMLCanvasElement

Implementation of

ILayoutService.getCanvasElement

Defined in

packages/ui/src/services/layout/layout.service.ts:129 (opens in a new tab)


registerCanvasElement()

registerCanvasElement(container): IDisposable

Register a canvas element.

Parameters

ParameterType
containerHTMLCanvasElement

Returns

IDisposable

Implementation of

ILayoutService.registerCanvasElement

Defined in

packages/ui/src/services/layout/layout.service.ts:120 (opens in a new tab)


registerContainerElement()

registerContainerElement(container): IDisposable

Register an element as a container, especially floating components like Dialogs and Notifications.

Parameters

ParameterType
containerHTMLElement

Returns

IDisposable

Implementation of

ILayoutService.registerContainerElement

Defined in

packages/ui/src/services/layout/layout.service.ts:147 (opens in a new tab)


registerFocusHandler()

registerFocusHandler(type, handler): IDisposable

Register a focus handler to focus on certain type of Univer unit.

Parameters

ParameterType
typeUniverInstanceType
handlerFocusHandlerFn

Returns

IDisposable

Implementation of

ILayoutService.registerFocusHandler

Defined in

packages/ui/src/services/layout/layout.service.ts:111 (opens in a new tab)


registerRootContainerElement()

registerRootContainerElement(container): IDisposable

Register the root container element.

Parameters

ParameterType
containerHTMLElement

Returns

IDisposable

Implementation of

ILayoutService.registerRootContainerElement

Defined in

packages/ui/src/services/layout/layout.service.ts:133 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.