diff --git a/mirador b/mirador index fd236dcb8581ca647b90793e29578fbdd2709bc0..3956139233904c4666e611a2b3aa09143cb67b57 160000 --- a/mirador +++ b/mirador @@ -1 +1 @@ -Subproject commit fd236dcb8581ca647b90793e29578fbdd2709bc0 +Subproject commit 3956139233904c4666e611a2b3aa09143cb67b57 diff --git a/src/AnnotationCreation.js b/src/AnnotationCreation.js index 8460aebdbf56880c633e31e4b511ee5cfb410325..dbd0b53f5ef7cff39e8ed9bfc4d493cbfdbe4ad0 100644 --- a/src/AnnotationCreation.js +++ b/src/AnnotationCreation.js @@ -144,7 +144,6 @@ class AnnotationCreation extends Component { ...annoState, valuetextTime: '', mediaVideo: null, - title: 'defaultTitle', }; this.submitForm = this.submitForm.bind(this); @@ -327,7 +326,6 @@ class AnnotationCreation extends Component { } = this.state; const t = (tstart && tend) ? `${tstart},${tend}` : null; const body = { value: (!textBody.length && t) ? `${secondsToHMS(tstart)} -> ${secondsToHMS(tend)}` : textBody }; - canvases.forEach((canvas) => { const storageAdapter = config.annotation.adapter(canvas.id); @@ -429,6 +427,7 @@ class AnnotationCreation extends Component { image, valueTime, mediaVideo, + title } = this.state; // TODO : Vérifier ce code, c'est étrange de comprarer un typeof à une chaine de caractère. @@ -437,12 +436,10 @@ class AnnotationCreation extends Component { valueTime[0] = tstart; valueTime[1] = tend; } - const isVideoDataLoaded = mediaVideo && mediaVideo.video && !isNaN(mediaVideo.video.duration) && mediaVideo.video.duration > 0; - return ( <CompanionWindow - title={annotation ? annotation.title : 'New Annotation'} + title={title ? title.value : 'New Annotation'} windowId={windowId} id={id} > diff --git a/src/WebAnnotation.js b/src/WebAnnotation.js index b9a3d7f1561ed3b39181bb4b6e0a303d6b258f0c..c1403648400613f7d42495d03534ff774cf373b5 100644 --- a/src/WebAnnotation.js +++ b/src/WebAnnotation.js @@ -4,7 +4,7 @@ export default class WebAnnotation { constructor({ canvasId, id, fragsel, image, body, tags, svg, manifestId, title }) { - this.title = title; + this.title = title, this.id = id; this.canvasId = canvasId; this.fragsel = fragsel; @@ -18,7 +18,6 @@ export default class WebAnnotation { /** */ toJson() { return { - title: this.title, body: this.createBody(), id: this.id, motivation: 'commenting', @@ -46,7 +45,6 @@ export default class WebAnnotation { }; bodies.push(imgBody); } - if(this.title){ const title={ type: 'AnnotationTitle',