@univerjsuiindexclassesDesktoplayoutservice

@univerjs/ui v0.5.0-beta.1Docs


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

submodules/univer/packages/ui/src/services/layout/layout.service.ts:75

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93

Accessors

isFocused

Get Signature

get isFocused(): boolean
Returns

boolean

Implementation of

ILayoutService.isFocused

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:65


rootContainerElement

Get Signature

get rootContainerElement(): Nullable<HTMLElement>
Returns

Nullable<HTMLElement>

Implementation of

ILayoutService.rootContainerElement

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:85

Methods

checkContentIsFocused()

checkContentIsFocused(): boolean

Returns

boolean

Implementation of

ILayoutService.checkContentIsFocused

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:158


checkElementInCurrentContainers()

checkElementInCurrentContainers(element): boolean

Parameters

ParameterType
elementHTMLElement

Returns

boolean

Implementation of

ILayoutService.checkElementInCurrentContainers

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:154


dispose()

dispose(): void

Returns

void

Inherited from

Disposable.dispose

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:106


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100


focus()

focus(): void

Re-focus the currently focused Univer business instance.

Returns

void

Implementation of

ILayoutService.focus

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:89


getContentElement()

getContentElement(): HTMLElement

Returns

HTMLElement

Implementation of

ILayoutService.getContentElement

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:127


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

submodules/univer/packages/ui/src/services/layout/layout.service.ts:145


registerContentElement()

registerContentElement(container): IDisposable

Register a content element.

Parameters

ParameterType
containerHTMLElement

Returns

IDisposable

Implementation of

ILayoutService.registerContentElement

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:118


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

submodules/univer/packages/ui/src/services/layout/layout.service.ts:109


registerRootContainerElement()

registerRootContainerElement(container): IDisposable

Register the root container element.

Parameters

ParameterType
containerHTMLElement

Returns

IDisposable

Implementation of

ILayoutService.registerRootContainerElement

Defined in

submodules/univer/packages/ui/src/services/layout/layout.service.ts:131