MCPcopy Index your code
hub / github.com/microsoft/SandDance / intersectMark

Function intersectMark

docs/app/js/sanddance-app.js:124824–124835  ·  view source on GitHub ↗
(mark, box, filter, hits)

Source from the content-addressed store, hash-verified

124822 return type25 ? intersectMark(scene, box, filter, hits) : type25 === "group" ? intersectGroup(scene, box, filter, hits) : (0, _vegaUtil.error)("Intersect scene must be mark node or group item.");
124823}
124824function intersectMark(mark, box, filter, hits) {
124825 if (visitMark(mark, box, filter)) {
124826 const items = mark.items, type26 = mark.marktype, n = items.length;
124827 let i = 0;
124828 if (type26 === "group") for(; i < n; ++i)intersectGroup(items[i], box, filter, hits);
124829 else for(const test = Marks[type26].isect; i < n; ++i){
124830 const item = items[i];
124831 if (intersectItem(item, box, test)) hits.push(item);
124832 }
124833 }
124834 return hits;
124835}
124836function visitMark(mark, box, filter) {
124837 // process if bounds intersect and if
124838 // (1) mark is a group mark (so we must recurse), or

Callers 2

intersectFunction · 0.70
intersectGroupFunction · 0.70

Calls 3

visitMarkFunction · 0.70
intersectGroupFunction · 0.70
intersectItemFunction · 0.70

Tested by

no test coverage detected