API Reference
@univerjs
@univerjs/ui
classes
Desktoplayoutservice

@univerjs/ui v0.4.2Docs


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): DesktopLayoutService

Parameters

ParameterType
_contextServiceContextService
_univerInstanceServiceIUniverInstanceService

Returns

DesktopLayoutService

Overrides

Disposable.constructor

Defined in

packages/ui/src/services/layout/layout.service.ts:75 (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:65 (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:85 (opens in a new tab)

Methods

checkContentIsFocused()

checkContentIsFocused(): boolean

Returns

boolean

Implementation of

ILayoutService.checkContentIsFocused

Defined in

packages/ui/src/services/layout/layout.service.ts:158 (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:154 (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()

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:89 (opens in a new tab)


getContentElement()

getContentElement(): HTMLElement

Returns

HTMLElement

Implementation of

ILayoutService.getContentElement

Defined in

packages/ui/src/services/layout/layout.service.ts:127 (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:145 (opens in a new tab)


registerContentElement()

registerContentElement(container): IDisposable

Register a content element.

Parameters

ParameterType
containerHTMLElement

Returns

IDisposable

Implementation of

ILayoutService.registerContentElement

Defined in

packages/ui/src/services/layout/layout.service.ts:118 (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:109 (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:131 (opens in a new tab)


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