(txt, font, textAnchor, gd)
| 852 | } |
| 853 | |
| 854 | function measureText(txt, font, textAnchor, gd) { |
| 855 | var element = document.createElementNS('http://www.w3.org/2000/svg', 'text'); |
| 856 | var sel = d3.select(element); |
| 857 | sel.text(txt) |
| 858 | .attr('x', 0) |
| 859 | .attr('y', 0) |
| 860 | .attr('text-anchor', textAnchor) |
| 861 | .attr('data-unformatted', txt) |
| 862 | .call(svgTextUtils.convertToTspans, gd) |
| 863 | .call(Drawing.font, font); |
| 864 | return Drawing.bBox(sel.node()); |
| 865 | } |
| 866 | |
| 867 | function cache(trace, name, initialValue, value, key, fn) { |
| 868 | var objName = '_cache' + name; |
no outgoing calls
no test coverage detected
searching dependent graphs…