MCPcopy Index your code
hub / github.com/plotly/plotly.js / path2coords

Function path2coords

test/jasmine/tests/polar_test.js:1768–1779  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1766 it('should place zoombox handles at correct place on main drag', function(done) {
1767 // d attr to array of segment [x,y]
1768 function path2coords(path) {
1769 if(!path.size()) return [[]];
1770 return path.attr('d')
1771 .replace(/Z/g, '')
1772 .split('M')
1773 .filter(Boolean)
1774 .map(function(s) {
1775 return s.split('L')
1776 .map(function(s) { return s.split(',').map(Number); });
1777 })
1778 .reduce(function(a, b) { return a.concat(b); });
1779 }
1780
1781 function _run(msg, p0, dp, exp) {
1782 var node = d3Select('.polar > .draglayer > .maindrag').node();

Callers 1

_runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…