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