@univerjs/ui v0.4.2 • Docs
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
Parameter | Type |
---|---|
_contextService | ContextService |
_univerInstanceService | IUniverInstanceService |
Returns
Overrides
Defined in
packages/ui/src/services/layout/layout.service.ts:75 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | packages/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
Parameter | Type |
---|---|
element | HTMLElement |
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
Defined in
packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
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
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
Parameter | Type |
---|---|
container | HTMLElement |
Returns
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
Parameter | Type |
---|---|
container | HTMLElement |
Returns
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
Parameter | Type |
---|---|
type | UniverInstanceType |
handler | FocusHandlerFn |
Returns
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
Parameter | Type |
---|---|
container | HTMLElement |
Returns
Implementation of
ILayoutService
.registerRootContainerElement
Defined in
packages/ui/src/services/layout/layout.service.ts:131 (opens in a new tab)