fix type declaration of private fields in cvat-canvas which are possibly null (#4932)

* fix type declaration of private fields in cvat-canvas which are possibly null

* v2.15.3
main
Seongmoon Jeong 3 years ago committed by GitHub
parent 352501c003
commit 6464069bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,6 @@
{ {
"name": "cvat-canvas", "name": "cvat-canvas",
"version": "2.15.2", "version": "2.15.3",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library", "description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts", "main": "src/canvas.ts",
"scripts": { "scripts": {

@ -86,7 +86,7 @@ export class DrawHandlerImpl implements DrawHandler {
y: number; y: number;
}; };
private crosshair: Crosshair; private crosshair: Crosshair;
private drawData: DrawData; private drawData: DrawData | null;
private geometry: Geometry; private geometry: Geometry;
private autoborderHandler: AutoborderHandler; private autoborderHandler: AutoborderHandler;
private autobordersEnabled: boolean; private autobordersEnabled: boolean;
@ -100,7 +100,7 @@ export class DrawHandlerImpl implements DrawHandler {
private initialized: boolean; private initialized: boolean;
private canceled: boolean; private canceled: boolean;
private pointsGroup: SVG.G | null; private pointsGroup: SVG.G | null;
private shapeSizeElement: ShapeSizeElement; private shapeSizeElement: ShapeSizeElement | null;
private getFinalEllipseCoordinates(points: number[], fitIntoFrame: boolean): number[] { private getFinalEllipseCoordinates(points: number[], fitIntoFrame: boolean): number[] {
const { offset } = this.geometry; const { offset } = this.geometry;

@ -20,11 +20,11 @@ export interface EditHandler {
export class EditHandlerImpl implements EditHandler { export class EditHandlerImpl implements EditHandler {
private onEditDone: (state: any, points: number[]) => void; private onEditDone: (state: any, points: number[]) => void;
private autoborderHandler: AutoborderHandler; private autoborderHandler: AutoborderHandler;
private geometry: Geometry; private geometry: Geometry | null;
private canvas: SVG.Container; private canvas: SVG.Container;
private editData: EditData; private editData: EditData | null;
private editedShape: SVG.Shape; private editedShape: SVG.Shape | null;
private editLine: SVG.PolyLine; private editLine: SVG.PolyLine | null;
private clones: SVG.Polygon[]; private clones: SVG.Polygon[];
private controlPointsSize: number; private controlPointsSize: number;
private autobordersEnabled: boolean; private autobordersEnabled: boolean;

@ -22,7 +22,7 @@ export class GroupHandlerImpl implements GroupHandler {
private bindedOnSelectStart: (event: MouseEvent) => void; private bindedOnSelectStart: (event: MouseEvent) => void;
private bindedOnSelectUpdate: (event: MouseEvent) => void; private bindedOnSelectUpdate: (event: MouseEvent) => void;
private bindedOnSelectStop: (event: MouseEvent) => void; private bindedOnSelectStop: (event: MouseEvent) => void;
private selectionRect: SVG.Rect; private selectionRect: SVG.Rect | null;
private startSelectionPoint: { private startSelectionPoint: {
x: number; x: number;
y: number; y: number;

@ -24,7 +24,7 @@ export class MergeHandlerImpl implements MergeHandler {
private constraints: { private constraints: {
labelID: number; labelID: number;
shapeType: string; shapeType: string;
}; } | null;
private addConstraints(): void { private addConstraints(): void {
const shape = this.statesToBeMerged[0]; const shape = this.statesToBeMerged[0];

@ -16,7 +16,7 @@ export class SplitHandlerImpl implements SplitHandler {
private onSplitDone: (object: any) => void; private onSplitDone: (object: any) => void;
private onFindObject: (event: MouseEvent) => void; private onFindObject: (event: MouseEvent) => void;
private canvas: SVG.Container; private canvas: SVG.Container;
private highlightedShape: SVG.Shape; private highlightedShape: SVG.Shape | null;
private initialized: boolean; private initialized: boolean;
private splitDone: boolean; private splitDone: boolean;

Loading…
Cancel
Save