|
338 | 338 | symbol.shiftX((maxWidth - symbol.width)/2);
|
339 | 339 | }
|
340 | 340 |
|
341 |
| - for (i = 0, len = this.symbols.length; i < len; i++) { |
342 |
| - symbol = this.symbols[i]; |
343 |
| - symbol.render(); |
344 |
| - } |
| 341 | + this.start.render(); |
| 342 | + // for (i = 0, len = this.symbols.length; i < len; i++) { |
| 343 | + // symbol = this.symbols[i]; |
| 344 | + // symbol.render(); |
| 345 | + // } |
345 | 346 |
|
346 | 347 | for (i = 0, len = this.symbols.length; i < len; i++) {
|
347 | 348 | symbol = this.symbols[i];
|
|
478 | 479 | this.next.shiftY(this.getY() + this.height + this.chart.options['line-length']);
|
479 | 480 | this.next.setX(bottomPoint.x - this.next.width/2);
|
480 | 481 | this.next.isPositioned = true;
|
| 482 | + |
| 483 | + this.next.render(); |
481 | 484 | }
|
482 | 485 | }
|
483 | 486 | };
|
|
849 | 852 | this.yes_symbol.shiftY(this.getY() + this.height + this.chart.options['line-length']);
|
850 | 853 | this.yes_symbol.setX(bottomPoint.x - this.yes_symbol.width/2);
|
851 | 854 | this.yes_symbol.isPositioned = true;
|
| 855 | + |
| 856 | + this.yes_symbol.render(); |
852 | 857 | }
|
853 | 858 | }
|
854 | 859 |
|
|
857 | 862 | var leftPoint = this.no_symbol.getLeft();
|
858 | 863 |
|
859 | 864 | if (!this.no_symbol.isPositioned) {
|
| 865 | + |
860 | 866 | this.no_symbol.setY(rightPoint.y - this.no_symbol.height/2);
|
861 | 867 | this.no_symbol.shiftX(this.group.getBBox().x + this.width + this.chart.options['line-length']);
|
| 868 | + |
| 869 | + var hasSymbolUnder = false; |
| 870 | + var symb; |
| 871 | + for (var i = 0, len = this.chart.symbols.length; i < len; i++) { |
| 872 | + symb = this.chart.symbols[i]; |
| 873 | + |
| 874 | + var diff = Math.abs(symb.getCenter().x - this.no_symbol.getCenter().x); |
| 875 | + if (symb.getCenter().y > this.no_symbol.getCenter().y && diff <= this.no_symbol.width/2) { |
| 876 | + hasSymbolUnder = true; |
| 877 | + break; |
| 878 | + } |
| 879 | + } |
| 880 | + |
| 881 | + if (hasSymbolUnder) { |
| 882 | + this.no_symbol.setX(symb.getX() + symb.width + this.chart.options['line-length']); |
| 883 | + } |
| 884 | + |
862 | 885 | this.no_symbol.isPositioned = true;
|
| 886 | + |
| 887 | + this.no_symbol.render(); |
863 | 888 | }
|
864 | 889 | }
|
865 | 890 | };
|
|
0 commit comments