Events
bindEvent ($el: ElementView, event: string, fn: EventCallback, options: EventListenerOptions): void
Name | Type | Default | Description |
---|---|---|---|
$el | ElementView | ||
event | string | ||
fn | EventCallback | ||
options | EventListenerOptions |
canvasPointerPosition (event: ScreenEvent, $canvas: CanvasView): Point
Gets the pointer position from an event triggered on an <canvas>
element, in the coordinate system of the <canvas>
element.
Name | Type | Default | Description |
---|---|---|---|
event | ScreenEvent | ||
$canvas | CanvasView |
getEventTarget (event: ScreenEvent): ElementView
Get the target element for an event, including for touch/pointer events that started on a different element.
Name | Type | Default | Description |
---|---|---|---|
event | ScreenEvent |
hover ($el: ElementView, options: HoverEventOptions): void
Name | Type | Default | Description |
---|---|---|---|
$el | ElementView | ||
options | HoverEventOptions |
pointerOver ($el: ElementView, fns: OverEventOptions): void
Name | Type | Default | Description |
---|---|---|---|
$el | ElementView | ||
fns | OverEventOptions |
pointerPosition (e: any): Point
Gets the pointer position from an event.
Name | Type | Default | Description |
---|---|---|---|
e | any |
slide ($el: ElementView, fns: SlideEventOptions): void
Name | Type | Default | Description |
---|---|---|---|
$el | ElementView | ||
fns | SlideEventOptions |
svgPointerPosn (event: ScreenEvent, $svg: SVGParentView): Point
Gets the pointer position from an event triggered on an <svg>
element, in the coordinate system of the <svg>
element.
Name | Type | Default | Description |
---|---|---|---|
event | ScreenEvent | ||
$svg | SVGParentView |