All files / roosterjs-content-model-plugins/lib/imageEdit/constants constants.ts

100% Statements 18/18
100% Branches 0/0
100% Functions 0/0
100% Lines 18/18

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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97          1x         1x         1x         1x         1x         1x         1x         1x                   1x         1x         1x         1x         1x         1x         1x         1x         1x         1x  
import type { DNDDirectionX, DnDDirectionY } from '../types/DragAndDropContext';
 
/**
 * @internal
 */
export const RESIZE_HANDLE_SIZE = 10;
 
/**
 * @internal
 */
export const RESIZE_HANDLE_MARGIN = 6;
 
/**
 * @internal
 */
export const ROTATE_SIZE = 32;
 
/**
 * @internal
 */
export const ROTATE_GAP = 15;
 
/**
 * @internal
 */
export const DEG_PER_RAD = 180 / Math.PI;
 
/**
 * @internal
 */
export const DEFAULT_ROTATE_HANDLE_HEIGHT = ROTATE_SIZE / 2 + ROTATE_GAP;
 
/**
 * @internal
 */
export const ROTATE_ICON_MARGIN = 8;
 
/**
 * @internal
 */
export const ROTATION: Record<string, number> = {
    sw: 0,
    nw: 90,
    ne: 180,
    se: 270,
};
 
/**
 * @internal
 */
export const Xs: DNDDirectionX[] = ['w', '', 'e'];
 
/**
 * @internal
 */
export const Ys: DnDDirectionY[] = ['s', '', 'n'];
 
/**
 * @internal
 */
export const ROTATE_WIDTH = 1;
 
/**
 * @internal
 */
export const ROTATE_HANDLE_TOP = ROTATE_GAP + RESIZE_HANDLE_MARGIN;
 
/**
 * @internal
 */
export const CROP_HANDLE_SIZE = 22;
 
/**
 * @internal
 */
export const CROP_HANDLE_WIDTH = 7;
 
/**
 * @internal
 */
export const XS_CROP: DNDDirectionX[] = ['w', 'e'];
 
/**
 * @internal
 */
export const YS_CROP: DnDDirectionY[] = ['s', 'n'];
 
/**
 * @internal
 */
export const MIN_HEIGHT_WIDTH = 3 * RESIZE_HANDLE_SIZE + 2 * RESIZE_HANDLE_MARGIN;
 
/**
 * @internal
 */
export const RESIZE_IMAGE = 'resizeImage';