Skip to content
Snippets Groups Projects
Commit f3801380 authored by Anthony's avatar Anthony
Browse files

Support annotation edition with image

parent b0f95639
Branches
No related tags found
1 merge request!10Draft: MigratingAnnotationCreation to MUI5.
Pipeline #1930 failed
......@@ -85,6 +85,8 @@ function AnnotationFormFooter({
const isNewAnnotation = !annotation;
// TODO dumb code to avoid error from Konva export. WIth image, Konva doesnot work
if (mediaIsVideo) {
// Save jpg image of the drawing in a data url
getKonvaAsDataURL(windowId).then((dataURL) => {
console.log('dataURL:', dataURL);
......@@ -94,6 +96,12 @@ function AnnotationFormFooter({
closeFormCompanionWindow();
resetStateAfterSave();
});
} else {
const annotation = { ...annotationToSaved };
saveAnnotationInEachCanvas(canvases, config, receiveAnnotation, annotation, target, isNewAnnotation);
closeFormCompanionWindow();
resetStateAfterSave();
}
};
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment