BlockSuite API Documentation / @blocksuite/blocks / HoverController
Class: HoverController
Implements
ReactiveController
Constructors
new HoverController()
new HoverController(
host
,onHover
,hoverOptions
?):HoverController
Parameters
• host: ReactiveElement
• onHover
• hoverOptions?: Partial
<HoverOptions
>
Returns
Source
packages/blocks/src/_common/components/hover/controller.ts:141
Properties
_abortController?
private
optional
_abortController:AbortController
Source
packages/blocks/src/_common/components/hover/controller.ts:123
_disposables
protected
_disposables:DisposableGroup
Source
packages/blocks/src/_common/components/hover/controller.ts:137
_hoverOptions
private
readonly
_hoverOptions:HoverOptions
Source
packages/blocks/src/_common/components/hover/controller.ts:133
_isHovering
private
_isHovering:boolean
=false
Source
packages/blocks/src/_common/components/hover/controller.ts:135
_onHover()
private
readonly
_onHover: (options
) =>null
|HoverPortalOptions
Parameters
• options: OptionsParams
Returns
null
| HoverPortalOptions
Source
packages/blocks/src/_common/components/hover/controller.ts:129
_portal?
private
optional
_portal:HTMLDivElement
Source
packages/blocks/src/_common/components/hover/controller.ts:127
_setReference()?
private
optional
_setReference: (element
?) =>void
Parameters
• element?: Element
Returns
void
Source
packages/blocks/src/_common/components/hover/controller.ts:125
host
host:
ReactiveElement
Source
packages/blocks/src/_common/components/hover/controller.ts:139
globalAbortController?
static
optional
globalAbortController:AbortController
Source
packages/blocks/src/_common/components/hover/controller.ts:121
Accessors
isHovering
get
isHovering():boolean
Whether the host is currently hovering.
This property is unreliable when the floating element disconnect from the DOM suddenly.
Returns
boolean
Source
packages/blocks/src/_common/components/hover/controller.ts:106
portal
get
portal():undefined
|HTMLDivElement
Returns
undefined
| HTMLDivElement
Source
packages/blocks/src/_common/components/hover/controller.ts:117
setReference
get
setReference(): (element
?) =>void
Returns
Function
Parameters
• element?: Element
Returns
void
Source
packages/blocks/src/_common/components/hover/controller.ts:110
Methods
abort()
abort(
force
):void
Parameters
• force: boolean
= false
Returns
void
Source
packages/blocks/src/_common/components/hover/controller.ts:220
hostConnected()
hostConnected():
void
Returns
void
Implementation of
ReactiveController.hostConnected
Source
packages/blocks/src/_common/components/hover/controller.ts:158
hostDisconnected()
hostDisconnected():
void
Returns
void
Implementation of
ReactiveController.hostDisconnected
Source
packages/blocks/src/_common/components/hover/controller.ts:215
onAbort()
onAbort():
void
Callback when the portal needs to be aborted.
Returns
void
Source
packages/blocks/src/_common/components/hover/controller.ts:154