(textBB, pt)
| 845 | } |
| 846 | |
| 847 | function transformOutsideText(textBB, pt) { |
| 848 | var x = pt.pxmid[0]; |
| 849 | var y = pt.pxmid[1]; |
| 850 | var dx = textBB.width / 2; |
| 851 | var dy = textBB.height / 2; |
| 852 | |
| 853 | if (x < 0) dx *= -1; |
| 854 | if (y < 0) dy *= -1; |
| 855 | |
| 856 | return { |
| 857 | scale: 1, |
| 858 | rCenter: 1, |
| 859 | rotate: 0, |
| 860 | x: dx + (Math.abs(dy) * (dx > 0 ? 1 : -1)) / 2, |
| 861 | y: dy / (1 + (x * x) / (y * y)), |
| 862 | outside: true |
| 863 | }; |
| 864 | } |
| 865 | |
| 866 | function positionTitleInside(cd0) { |
| 867 | var textDiameter = Math.sqrt(cd0.titleBox.width * cd0.titleBox.width + cd0.titleBox.height * cd0.titleBox.height); |
no outgoing calls
no test coverage detected
searching dependent graphs…