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

Function getSubtract

src/components/selections/select.js:1447–1461  ·  view source on GitHub ↗
(polygon, previousPolygons)

Source from the content-addressed store, hash-verified

1445}
1446
1447function getSubtract(polygon, previousPolygons) {
1448 var subtract = false;
1449 for(var i = 0; i < previousPolygons.length; i++) {
1450 var previousPolygon = previousPolygons[i];
1451
1452 // find out if a point of polygon is inside previous polygons
1453 for(var k = 0; k < polygon.length; k++) {
1454 if(pointInPolygon(polygon[k], previousPolygon)) {
1455 subtract = !subtract;
1456 break;
1457 }
1458 }
1459 }
1460 return subtract;
1461}
1462
1463function convert(ax, d) {
1464 if(ax.type === 'date') d = d.replace('_', ' ');

Callers 3

mergePolygonsFunction · 0.85
reselectFunction · 0.85
getLayoutPolygonsFunction · 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…