path change
This commit is contained in:
@@ -15,6 +15,8 @@ import { DeleteConfirmModal } from "../components/annotate/DeleteConfirmModal";
|
|||||||
import { drawOverlay, colorForClass } from "../components/extract/overlay";
|
import { drawOverlay, colorForClass } from "../components/extract/overlay";
|
||||||
import type { Settings } from "../types";
|
import type { Settings } from "../types";
|
||||||
|
|
||||||
|
const DEFAULT_CLASS_ID = 0;
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
username: string;
|
username: string;
|
||||||
settings: Settings | null;
|
settings: Settings | null;
|
||||||
@@ -761,7 +763,7 @@ export function AnnotateMode({ username, settings }: Props) {
|
|||||||
return (
|
return (
|
||||||
classesRef.current[classId] ??
|
classesRef.current[classId] ??
|
||||||
classes[classId] ??
|
classes[classId] ??
|
||||||
`class_${classId}`
|
"Object"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -940,10 +942,12 @@ export function AnnotateMode({ username, settings }: Props) {
|
|||||||
setSelectedAnnId(null);
|
setSelectedAnnId(null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (activeClassId == null) {
|
// if (activeClassId == null) {
|
||||||
setStatusMsg("Pick a class on the right first");
|
// setStatusMsg("Pick a class on the right first");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
const classId = activeClassId ?? DEFAULT_CLASS_ID;
|
||||||
|
|
||||||
e.stopPropagation(); // don't let the pan handler see this
|
e.stopPropagation(); // don't let the pan handler see this
|
||||||
const p = canvasToImageCoords(e.clientX, e.clientY);
|
const p = canvasToImageCoords(e.clientX, e.clientY);
|
||||||
if (!p) return;
|
if (!p) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user