All files / tools/src/types ISetToolModeOptions.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30                                                           
import type { ToolModes, MouseBindings, KeyboardBindings } from '../enums';
 
type ToolBindingMouseType = (typeof MouseBindings)[keyof typeof MouseBindings];
 
type ToolBindingKeyboardType =
  (typeof KeyboardBindings)[keyof typeof KeyboardBindings];
 
type IToolBinding = {
  /** Mouse button bindings e.g., MouseBindings.Primary/Secondary etc. */
  mouseButton?: ToolBindingMouseType;
  /** Keyboard bindings e.g., KeyboardBindings.Shift/Ctrl etc. */
  modifierKey?: ToolBindingKeyboardType;
  /** Number of touch points */
  numTouchPoints?: number;
};
 
type SetToolBindingsType = {
  /** bindings for the toolGroup's tool when it is set to be active */
  bindings: IToolBinding[];
};
 
type ToolOptionsType = {
  /** bindings for the toolGroup's tool when it is set to be active */
  bindings: IToolBinding[];
  /** mode of the tool */
  mode: ToolModes;
};
 
export type { IToolBinding, SetToolBindingsType, ToolOptionsType };