From 7cb70ef8dfc4e13930c9b63098d6c74fce9dc020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Poujade?= <lois.poujade@tetras-libre.fr> Date: Mon, 16 Jan 2023 11:23:38 +0100 Subject: [PATCH] WIP standard --- src/WebAnnotation.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/WebAnnotation.js b/src/WebAnnotation.js index 8437166..948dc89 100644 --- a/src/WebAnnotation.js +++ b/src/WebAnnotation.js @@ -37,13 +37,11 @@ export default class WebAnnotation { bodies.push(textBody); } + // TODO WebAnnot format if (this.image) { - const imgBody = { - // TODO format detection - format: 'image/jpg', - id: this.image.url, - type: 'Image', - }; + const imgBody = { type: 'Image' }; + Object.assign(imgBody, this.image); + imgBody.id = imgBody.url; bodies.push(imgBody); } -- GitLab