diff --git a/src/WebAnnotation.js b/src/WebAnnotation.js index 486d1e7..75f7066 100644 --- a/src/WebAnnotation.js +++ b/src/WebAnnotation.js @@ -11,7 +11,7 @@ export default class WebAnnotation { const stub = { '@context': 'http://www.w3.org/ns/anno.jsonld', 'type': 'Annotation', - 'id': uuid(), + 'id': `#${uuid()}`, 'body': [] }; diff --git a/src/relations/Connection.js b/src/relations/Connection.js index 8f09071..6df5d9a 100644 --- a/src/relations/Connection.js +++ b/src/relations/Connection.js @@ -52,7 +52,7 @@ export default class Connection extends EventEmitter { /** Initializes a fixed connection from an annotation **/ initFromAnnotation = function(contentEl, svgEl, annotation) { const [ fromId, toId ] = annotation.target.map(t => t.id); - const relation = annotation.bodies[0].value; // Temporary hack + const relation = annotation.bodies[0].value; const fromNode = getNodeById(contentEl, fromId); const fromBounds = new Bounds(fromNode.elements, svgEl); diff --git a/src/selection/Selection.js b/src/selection/Selection.js index ec88f8f..d7f1189 100644 --- a/src/selection/Selection.js +++ b/src/selection/Selection.js @@ -88,7 +88,7 @@ export default class Selection { const a = Object.assign({}, this._stub, { '@context': 'http://www.w3.org/ns/anno.jsonld', 'type': 'Annotation', - 'id': uuid() + 'id': `#${uuid()}` }); return new WebAnnotation(a);