Fixed bug that created invalid annotations for relations
This commit is contained in:
parent
d491c402af
commit
8121aa38ec
|
@ -1,3 +1,5 @@
|
||||||
|
import uuid from 'uuid/v1';
|
||||||
|
|
||||||
export default class WebAnnotation {
|
export default class WebAnnotation {
|
||||||
|
|
||||||
constructor(annotation) {
|
constructor(annotation) {
|
||||||
|
@ -9,6 +11,7 @@ export default class WebAnnotation {
|
||||||
const stub = {
|
const stub = {
|
||||||
'@context': 'http://www.w3.org/ns/anno.jsonld',
|
'@context': 'http://www.w3.org/ns/anno.jsonld',
|
||||||
'type': 'Annotation',
|
'type': 'Annotation',
|
||||||
|
'id': uuid(),
|
||||||
'body': []
|
'body': []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -142,8 +142,8 @@ export default class DrawingTool extends EventEmitter {
|
||||||
|
|
||||||
const annotation = WebAnnotation.create({
|
const annotation = WebAnnotation.create({
|
||||||
target: [
|
target: [
|
||||||
{ id: from.id },
|
{ id: `#${from.id}` },
|
||||||
{ id: to.id }
|
{ id: `#${to.id}` }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue