lost-sia
Version:
Single Image Annotation Tool
31 lines (30 loc) • 1.77 kB
TypeScript
import { default as AnnotationTool } from '../models/AnnotationTool';
import { default as Annotation } from '../Annotation/logic/Annotation';
import { AnnotationSettings, Label, UiConfig, PolygonOperationResult, SIANotification } from '../types';
type CanvasProps = {
annotations?: Annotation[];
annotationSettings: AnnotationSettings;
defaultLabelId?: number;
image: string;
isFullscreen?: boolean;
isImageJunk?: boolean;
isPolygonSelectionMode?: boolean;
selectedAnnotation: Annotation | undefined;
selectedAnnoTool: AnnotationTool;
toolbarHeight?: number;
polygonOperationResult?: PolygonOperationResult;
possibleLabels: Label[];
preventScrolling?: boolean;
uiConfig: UiConfig;
onAnnoCreated: (createdAnno: Annotation) => void;
onAnnoCreationFinished: (createdAnno: Annotation, hasAnnotationExisted: boolean) => void;
onAnnoChanged: (changedAnno: Annotation) => void;
onAnnoEditing: (annoToEdit: Annotation) => void;
onNotification?: (notification: SIANotification) => void;
onRequestNewAnnoId: () => number;
onSelectAnnotation: (annotation?: Annotation) => void;
onSetSelectedTool: (tool: AnnotationTool) => void;
onShouldDeleteAnno: (internalAnnoId: number) => void;
};
declare const Canvas: ({ annotations, annotationSettings, defaultLabelId, image, isFullscreen, isImageJunk, isPolygonSelectionMode, polygonOperationResult, possibleLabels, preventScrolling, selectedAnnotation, selectedAnnoTool, toolbarHeight, uiConfig, onAnnoCreated, onAnnoCreationFinished, onAnnoChanged, onAnnoEditing, onNotification, onRequestNewAnnoId, onSelectAnnotation, onSetSelectedTool, onShouldDeleteAnno, }: CanvasProps) => import("react/jsx-runtime").JSX.Element;
export default Canvas;