UNPKG

mind-elixir

Version:

Mind elixir is a free open source mind map core.

17 lines (16 loc) 781 B
export type MouseButton = 0 | 1 | 2 | 3 | 4; export type Modifier = 'ctrl' | 'alt' | 'shift'; export type MouseButtonWithModifiers = { button: MouseButton; modifiers: Modifier[]; }; export type Trigger = MouseButton | MouseButtonWithModifiers; /** * Determines whether a MouseEvent should execute until completion depending on * which button and modifier(s) are active for the MouseEvent. * The Event will execute to completion if ANY of the triggers "matches" * @param event MouseEvent that should be checked * @param triggers A list of Triggers that signify that the event should execute until completion * @returns Whether the MouseEvent should execute until completion */ export declare const matchesTrigger: (event: MouseEvent, triggers: Trigger[]) => boolean;