@univerjs/ui v0.1.17 • 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,
_editorService): DesktopLayoutService
Parameters
Parameter | Type |
---|---|
_contextService | ContextService |
_univerInstanceService | IUniverInstanceService |
_editorService | IEditorService |
Returns
Overrides
Defined in
packages/ui/src/services/layout/layout.service.ts:76 (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: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
Parameter | Type |
---|---|
element | HTMLElement |
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
Defined in
packages/core/src/shared/lifecycle.ts:106 (opens in a new tab)
disposeWithMe()
protected disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
IDisposable
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: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
Parameter | Type |
---|---|
container | HTMLCanvasElement |
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
Parameter | Type |
---|---|
container | HTMLElement |
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
Parameter | Type |
---|---|
type | UniverInstanceType |
handler | FocusHandlerFn |
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
Parameter | Type |
---|---|
container | HTMLElement |
Returns
IDisposable
Implementation of
ILayoutService
.registerRootContainerElement
Defined in
packages/ui/src/services/layout/layout.service.ts:133 (opens in a new tab)