Skip to content

Commit 38518b1

Browse files
committed
new version
1 parent 39020a4 commit 38518b1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

flowchart-latest.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// flowchart, v1.2.10
1+
// flowchart, v1.2.11
22
// Copyright (c)2014 Adriano Raiano (adrai).
33
// Distributed under MIT license
44
// http://adrai.github.io/flowchart.js
@@ -435,6 +435,8 @@
435435
this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;
436436

437437
this.text = this.chart.paper.text(0, 0, options.text);
438+
//Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t
439+
if (options.key) { this.text.node.id = options.key + 't'; }
438440
this.text.attr({
439441
'text-anchor': 'start',
440442
'font-size': (this.chart.options.symbols[this.symbolType]['font-size'] || this.chart.options['font-size']),
@@ -480,6 +482,7 @@
480482
});
481483
if (options.link) { symbol.attr('href', options.link); }
482484
if (options.target) { symbol.attr('target', options.target); }
485+
if (options.key) { symbol.node.id = options.key; }
483486

484487
this.group.push(symbol);
485488
symbol.insertBefore(this.text);
@@ -899,6 +902,7 @@
899902
height: this.text.getBBox().height + 2 * (this.chart.options.symbols[this.symbolType]['text-margin'] || this.chart.options['text-margin']),
900903
fill: (this.chart.options.symbols[this.symbolType]['fill'] || this.chart.options['fill'])
901904
});
905+
if (options.key) { innerWrap.node.id = options.key + 'i'; }
902906

903907
var font = (this.chart.options.symbols[this.symbolType]['font'] || this.chart.options['font']);
904908
var fontF = (this.chart.options.symbols[this.symbolType]['font-family'] || this.chart.options['font-family']);
@@ -947,6 +951,7 @@
947951
});
948952
if (options.link) { symbol.attr('href', options.link); }
949953
if (options.target) { symbol.attr('target', options.target); }
954+
if (options.key) { symbol.node.id = options.key; }
950955

951956
this.text.attr({
952957
y: symbol.getBBox().height/2
@@ -1034,6 +1039,7 @@
10341039
});
10351040
if (options.link) { symbol.attr('href', options.link); }
10361041
if (options.target) { symbol.attr('target', options.target); }
1042+
if (options.key) { symbol.node.id = options.key; }
10371043

10381044
this.text.attr({
10391045
y: symbol.getBBox().height/2

0 commit comments

Comments
 (0)