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

Function outline2coords

test/jasmine/tests/select_test.js:1718–1730  ·  view source on GitHub ↗
(outline)

Source from the content-addressed store, hash-verified

1716
1717 // d attr to array of segment [x,y]
1718 function outline2coords(outline) {
1719 if(!outline.size()) return [[]];
1720
1721 return outline.attr('d')
1722 .replace(/Z/g, '')
1723 .split('M')
1724 .filter(Boolean)
1725 .map(function(s) {
1726 return s.split('L')
1727 .map(function(s) { return s.split(',').map(Number); });
1728 })
1729 .reduce(function(a, b) { return a.concat(b); });
1730 }
1731
1732 function _assert(msg, exp) {
1733 var outline = d3Select(gd).select('.zoomlayer').select('.select-outline');

Callers 1

_assertFunction · 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…