TS Module from CVAT-Canvas (#663)
* Fixed drawn coordinates * TypeScript build * A couple of fixes * Removed extra changes from webpack * Init grouper, dumper and merger * Removed extra aliases (they were used for test only)main
parent
e15340d625
commit
768c254c9e
@ -0,0 +1,122 @@
|
||||
.cvat_canvas_hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cvat_canvas_shape {
|
||||
fill-opacity: 0.1;
|
||||
stroke-opacity: 1;
|
||||
}
|
||||
|
||||
polyline.cvat_canvas_shape {
|
||||
fill-opacity: 0;
|
||||
stroke-opacity: 1;
|
||||
}
|
||||
|
||||
.cvat_canvas_text {
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
fill: white;
|
||||
cursor: default;
|
||||
font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
|
||||
text-shadow: 0px 0px 4px black;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.cvat_canvas_crosshair {
|
||||
stroke: red;
|
||||
}
|
||||
|
||||
.cvat_canvas_shape_activated {
|
||||
|
||||
}
|
||||
|
||||
.cvat_canvas_shape_grouping {
|
||||
|
||||
}
|
||||
|
||||
.cvat_canvas_shape_merging {
|
||||
|
||||
}
|
||||
|
||||
.cvat_canvas_shape_drawing {
|
||||
fill-opacity: 0.1;
|
||||
stroke-opacity: 1;
|
||||
fill: white;
|
||||
stroke: black;
|
||||
}
|
||||
|
||||
.svg_select_boundingRect {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#cvat_canvas_wrapper {
|
||||
width: 100%;
|
||||
height: 93%;
|
||||
border-radius: 5px;
|
||||
background-color: white;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#cvat_canvas_loading_animation {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#cvat_canvas_loading_circle {
|
||||
fill-opacity: 0;
|
||||
stroke: #09c;
|
||||
stroke-width: 3px;
|
||||
stroke-dasharray: 50;
|
||||
animation: loadingAnimation 1s linear infinite;
|
||||
}
|
||||
|
||||
#cvat_canvas_text_content {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
pointer-events: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#cvat_canvas_background {
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
background-repeat: no-repeat;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: 2px 2px 5px 0px rgba(0,0,0,0.75);
|
||||
}
|
||||
|
||||
#cvat_canvas_grid {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#cvat_canvas_grid_pattern {
|
||||
opacity: 1;
|
||||
stroke: white;
|
||||
}
|
||||
|
||||
#cvat_canvas_content {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
outline: 10px solid black;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@keyframes loadingAnimation {
|
||||
0% {stroke-dashoffset: 1; stroke: #09c;}
|
||||
50% {stroke-dashoffset: 100; stroke: #f44;}
|
||||
100% {stroke-dashoffset: 300; stroke: #09c;}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,19 @@
|
||||
import { GroupData } from './canvasModel';
|
||||
|
||||
export interface GroupHandler {
|
||||
group(groupData: GroupData): void;
|
||||
}
|
||||
|
||||
export class GroupHandlerImpl implements GroupHandler {
|
||||
// callback is used to notify about grouping end
|
||||
private onGroupDone: (objects: any[], reset: boolean) => void;
|
||||
|
||||
public constructor(onGroupDone: any) {
|
||||
this.onGroupDone = onGroupDone;
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line */
|
||||
public group(groupData: GroupData): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
import { MergeData } from './canvasModel';
|
||||
|
||||
export interface MergeHandler {
|
||||
merge(mergeData: MergeData): void;
|
||||
}
|
||||
|
||||
export class MergeHandlerImpl implements MergeHandler {
|
||||
// callback is used to notify about merging end
|
||||
private onMergeDone: (objects: any[]) => void;
|
||||
|
||||
public constructor(onMergeDone: any) {
|
||||
this.onMergeDone = onMergeDone;
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line */
|
||||
public merge(mergeData: MergeData): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
import { SplitData } from './canvasModel';
|
||||
|
||||
export interface SplitHandler {
|
||||
split(splitData: SplitData): void;
|
||||
}
|
||||
|
||||
export class SplitHandlerImpl implements SplitHandler {
|
||||
// callback is used to notify about splitting end
|
||||
private onSplitDone: (object: any) => void;
|
||||
|
||||
public constructor(onSplitDone: any) {
|
||||
this.onSplitDone = onSplitDone;
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line */
|
||||
public split(splitData: SplitData): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue