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

Function castMultiPolygon

src/components/selections/select.js:1468–1483  ·  view source on GitHub ↗
(allPolygons)

Source from the content-addressed store, hash-verified

1466}
1467
1468function castMultiPolygon(allPolygons) {
1469 var len = allPolygons.length;
1470
1471 // descibe multi polygons in one polygon
1472 var p = [];
1473 for(var i = 0; i < len; i++) {
1474 var polygon = allPolygons[i];
1475 p = p.concat(polygon);
1476
1477 // add starting vertex to close
1478 // which indicates next polygon
1479 p = p.concat([polygon[0]]);
1480 }
1481
1482 return computeRectAndRanges(p);
1483}
1484
1485function computeRectAndRanges(poly) {
1486 poly.isRect = poly.length === 5 &&

Callers 2

prepSelectFunction · 0.85
reselectFunction · 0.85

Calls 1

computeRectAndRangesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…