More fixing of inconsistencies with hash IDs
This commit is contained in:
parent
b8b126db68
commit
b162443053
|
@ -51,6 +51,7 @@ export default class Connection extends EventEmitter {
|
|||
|
||||
/** Initializes a fixed connection from an annotation **/
|
||||
initFromAnnotation = function(contentEl, svgEl, annotation) {
|
||||
console.log('init', annotation);
|
||||
const [ fromId, toId ] = annotation.target.map(t => t.id);
|
||||
const relation = annotation.bodies[0].value;
|
||||
|
||||
|
|
|
@ -142,8 +142,8 @@ export default class DrawingTool extends EventEmitter {
|
|||
|
||||
const annotation = WebAnnotation.create({
|
||||
target: [
|
||||
{ id: `#${from.id}` },
|
||||
{ id: `#${to.id}` }
|
||||
{ id: from.id },
|
||||
{ id: to.id }
|
||||
]
|
||||
});
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ export default class RelationEditor extends Component {
|
|||
|
||||
// Fire create or update event
|
||||
if (this.props.relation.annotation.bodies.length === 0)
|
||||
this.props.onRelationCreated(updatedRelation);
|
||||
this.props.onRelationCreated(updatedRelation, this.props.relation);
|
||||
else
|
||||
this.props.onRelationUpdated(updatedRelation, this.props.relation);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue