Skip to content

Commit

Permalink
Merge pull request #27 from geminiyu233/master
Browse files Browse the repository at this point in the history
添加connection修改事件
  • Loading branch information
grzhan authored Jul 1, 2019
2 parents 7d189a3 + 05e292b commit 9421fd2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Annotator/View/Entities/ConnectionView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export namespace ConnectionView {
this.context.attachTo.root.root.emit('connectionRightClicked', this.id, e.clientX, e.clientY);
e.preventDefault();
});
// 点击connection,可以进行修改
this.svgElement.on('click', (e)=>{
this.context.attachTo.root.root.emit('connectionClicked', this.id, e.clientX, e.clientY);
e.preventDefault();
});
this.svgElement.addClass('connection-view');
// to deceive svg.js not to call bbox when call x() and y()
// bad for svg.js
Expand Down Expand Up @@ -222,4 +227,4 @@ export namespace ConnectionView {
return super.delete(key);
}
}
}
}

0 comments on commit 9421fd2

Please sign in to comment.