contextmenu_helpers.ts

Declarations
#

11 declarations

view source

contextmenu_calculate_constrained_x
#

contextmenu_helpers.ts view source

(menu_x: number, menu_width: number, layout_width: number): number

menu_x

type number

menu_width

type number

layout_width

type number

returns

number

contextmenu_calculate_constrained_y
#

contextmenu_helpers.ts view source

(menu_y: number, menu_height: number, layout_height: number): number

menu_y

type number

menu_height

type number

layout_height

type number

returns

number

contextmenu_create_keyboard_handlers
#

contextmenu_create_keydown_handler
#

contextmenu_helpers.ts view source

(keyboard_handlers: Map<string, () => void>): (e: KeyboardEvent) => void

keyboard_handlers

type Map<string, () => void>

returns

(e: KeyboardEvent) => void

CONTEXTMENU_DEFAULT_BYPASS_MOVE_TOLERANCE
#

CONTEXTMENU_DEFAULT_BYPASS_WINDOW
#

CONTEXTMENU_DEFAULT_LONGPRESS_DURATION
#

CONTEXTMENU_DEFAULT_LONGPRESS_MOVE_TOLERANCE
#

CONTEXTMENU_DEFAULT_OPEN_OFFSET_X
#

CONTEXTMENU_DEFAULT_OPEN_OFFSET_Y
#

contextmenu_is_valid_target
#

contextmenu_helpers.ts view source

(target: EventTarget | null, shiftKey: boolean): target is HTMLElement | SVGElement

Returns true if valid and narrows the type to HTMLElement | SVGElement.

target

type EventTarget | null

shiftKey

type boolean

returns

boolean

Imported by
#