|
1 |
| -// flowchart, v1.2.10 |
| 1 | +// flowchart, v1.2.11 |
2 | 2 | // Copyright (c)2014 Adriano Raiano (adrai).
|
3 | 3 | // Distributed under MIT license
|
4 | 4 | // http://adrai.github.io/flowchart.js
|
|
435 | 435 | this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;
|
436 | 436 |
|
437 | 437 | 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'; } |
438 | 440 | this.text.attr({
|
439 | 441 | 'text-anchor': 'start',
|
440 | 442 | 'font-size': (this.chart.options.symbols[this.symbolType]['font-size'] || this.chart.options['font-size']),
|
|
480 | 482 | });
|
481 | 483 | if (options.link) { symbol.attr('href', options.link); }
|
482 | 484 | if (options.target) { symbol.attr('target', options.target); }
|
| 485 | + if (options.key) { symbol.node.id = options.key; } |
483 | 486 |
|
484 | 487 | this.group.push(symbol);
|
485 | 488 | symbol.insertBefore(this.text);
|
|
899 | 902 | height: this.text.getBBox().height + 2 * (this.chart.options.symbols[this.symbolType]['text-margin'] || this.chart.options['text-margin']),
|
900 | 903 | fill: (this.chart.options.symbols[this.symbolType]['fill'] || this.chart.options['fill'])
|
901 | 904 | });
|
| 905 | + if (options.key) { innerWrap.node.id = options.key + 'i'; } |
902 | 906 |
|
903 | 907 | var font = (this.chart.options.symbols[this.symbolType]['font'] || this.chart.options['font']);
|
904 | 908 | var fontF = (this.chart.options.symbols[this.symbolType]['font-family'] || this.chart.options['font-family']);
|
|
947 | 951 | });
|
948 | 952 | if (options.link) { symbol.attr('href', options.link); }
|
949 | 953 | if (options.target) { symbol.attr('target', options.target); }
|
| 954 | + if (options.key) { symbol.node.id = options.key; } |
950 | 955 |
|
951 | 956 | this.text.attr({
|
952 | 957 | y: symbol.getBBox().height/2
|
|
1034 | 1039 | });
|
1035 | 1040 | if (options.link) { symbol.attr('href', options.link); }
|
1036 | 1041 | if (options.target) { symbol.attr('target', options.target); }
|
| 1042 | + if (options.key) { symbol.node.id = options.key; } |
1037 | 1043 |
|
1038 | 1044 | this.text.attr({
|
1039 | 1045 | y: symbol.getBBox().height/2
|
|
0 commit comments