Field Notes
Field Notes home
Docs
Playground
Preparing search index...
@fieldnotes/core
ElementInteractionAdapter
Interface ElementInteractionAdapter<T>
interface
ElementInteractionAdapter
<
T
extends
BaseElement
>
{
hitTestHandle
?
(
el
:
T
,
point
:
Point
,
context
:
ExtensionInteractionContext
,
)
:
ExtensionInteractionHandle
|
null
;
renderSelection
?
(
ctx
:
CanvasRenderingContext2D
,
el
:
T
,
context
:
{
selectedCount
:
number
;
theme
:
ResolvedTheme
;
zoom
:
number
}
,
)
:
void
;
rotate
?
(
el
:
T
,
pivot
:
Point
,
delta
:
number
)
:
T
;
updateHandle
?
(
el
:
T
,
handleId
:
string
,
point
:
Point
,
context
:
ExtensionInteractionContext
,
)
:
T
;
}
Type Parameters
T
extends
BaseElement
Index
Methods
hit
Test
Handle?
render
Selection?
rotate?
update
Handle?
Methods
Optional
hit
Test
Handle
hitTestHandle
?
(
el
:
T
,
point
:
Point
,
context
:
ExtensionInteractionContext
,
)
:
ExtensionInteractionHandle
|
null
Parameters
el
:
T
point
:
Point
context
:
ExtensionInteractionContext
Returns
ExtensionInteractionHandle
|
null
Optional
render
Selection
renderSelection
?
(
ctx
:
CanvasRenderingContext2D
,
el
:
T
,
context
:
{
selectedCount
:
number
;
theme
:
ResolvedTheme
;
zoom
:
number
}
,
)
:
void
Parameters
ctx
:
CanvasRenderingContext2D
el
:
T
context
:
{
selectedCount
:
number
;
theme
:
ResolvedTheme
;
zoom
:
number
}
Returns
void
Optional
rotate
rotate
?
(
el
:
T
,
pivot
:
Point
,
delta
:
number
)
:
T
Parameters
el
:
T
pivot
:
Point
delta
:
number
Returns
T
Optional
update
Handle
updateHandle
?
(
el
:
T
,
handleId
:
string
,
point
:
Point
,
context
:
ExtensionInteractionContext
,
)
:
T
Parameters
el
:
T
handleId
:
string
point
:
Point
context
:
ExtensionInteractionContext
Returns
T
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
hit
Test
Handle
render
Selection
rotate
update
Handle
Field Notes home
Docs
Playground
Field Notes
Loading...