[ui] fix annotation error on img reload
parent
1a38d4f66e
commit
bd24f1f01d
|
@ -25,6 +25,7 @@
|
|||
) => void);
|
||||
clearAnnotations: () => void;
|
||||
readOnly: boolean;
|
||||
destroy: () => void;
|
||||
}
|
||||
|
||||
interface W3cAnnotation {
|
||||
|
@ -77,11 +78,12 @@
|
|||
let a8sLinkAddress: string;
|
||||
|
||||
async function loaded() {
|
||||
if (imageLoaded) return;
|
||||
imageLoaded = true;
|
||||
|
||||
const { Annotorious } = await import("@recogito/annotorious");
|
||||
|
||||
if (anno) {
|
||||
anno.destroy();
|
||||
}
|
||||
|
||||
anno = new Annotorious({
|
||||
image: imageEl,
|
||||
drawOnSingleClick: true,
|
||||
|
|
Loading…
Reference in New Issue