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 type { Settings } from "../types";
|
||||
|
||||
const DEFAULT_CLASS_ID = 0;
|
||||
|
||||
interface Props {
|
||||
username: string;
|
||||
settings: Settings | null;
|
||||
@@ -761,7 +763,7 @@ export function AnnotateMode({ username, settings }: Props) {
|
||||
return (
|
||||
classesRef.current[classId] ??
|
||||
classes[classId] ??
|
||||
`class_${classId}`
|
||||
"Object"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -940,10 +942,12 @@ export function AnnotateMode({ username, settings }: Props) {
|
||||
setSelectedAnnId(null);
|
||||
return;
|
||||
}
|
||||
if (activeClassId == null) {
|
||||
setStatusMsg("Pick a class on the right first");
|
||||
return;
|
||||
}
|
||||
// if (activeClassId == null) {
|
||||
// setStatusMsg("Pick a class on the right first");
|
||||
// return;
|
||||
// }
|
||||
const classId = activeClassId ?? DEFAULT_CLASS_ID;
|
||||
|
||||
e.stopPropagation(); // don't let the pan handler see this
|
||||
const p = canvasToImageCoords(e.clientX, e.clientY);
|
||||
if (!p) return;
|
||||
|
||||
Reference in New Issue
Block a user