sigit.io/src/types/drawing.ts
eugene 94c1d457f7 revert 4556bd0c66
revert fix: pdf to png scaling is 1, bottom position is now included
2024-08-05 11:55:20 +00:00

49 lines
788 B
TypeScript

export interface MouseState {
clicked?: boolean
dragging?: boolean
resizing?: boolean
coordsInWrapper?: {
mouseX: number
mouseY: number
}
}
export interface PdfFile {
file: File,
pages: PdfPage[]
expanded?: boolean
}
export interface PdfPage {
image: string
drawnFields: DrawnField[]
}
export interface DrawnField {
left: number
top: number
width: number
height: number
type: MarkType
/**
* npub of a counter part
*/
counterpart: string
}
export interface DrawTool {
identifier: MarkType
label: string
icon: JSX.Element,
defaultValue?: string
selected?: boolean
active?: boolean
}
export enum MarkType {
SIGNATURE = 'SIGNATURE',
JOBTITLE = 'JOBTITLE',
FULLNAME = 'FULLNAME',
DATE = 'DATE',
DATETIME = 'DATETIME'
}