#1460 Add link target option to flowchart click

This commit is contained in:
Marc Faber
2020-07-28 10:49:54 +02:00
parent f0ed170b04
commit d04d8c3a1d
8 changed files with 83 additions and 29 deletions

View File

@@ -486,6 +486,9 @@ export const draw = function(text, id) {
link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));
link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
if (vertex.linkTarget) {
link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);
}
const linkNode = node.insert(function() {
return link;