(textBB, radius)
| 845 | } |
| 846 | |
| 847 | function fitTextInsideCircle(textBB, radius) { |
| 848 | // compute scaling ratio to have text fit within specified radius |
| 849 | var elRadius = Math.sqrt((textBB.width / 2) * (textBB.width / 2) + textBB.height * textBB.height); |
| 850 | var ratio = radius / elRadius; |
| 851 | return [ratio, textBB, radius]; |
| 852 | } |
| 853 | |
| 854 | function measureText(txt, font, textAnchor, gd) { |
| 855 | var element = document.createElementNS('http://www.w3.org/2000/svg', 'text'); |
no outgoing calls
no test coverage detected
searching dependent graphs…