MCPcopy Create free account
hub / github.com/microsoft/SandDance / intersectMark

Function intersectMark

docs/tests/v2/es6/js/sanddance.js:102661–102681  ·  view source on GitHub ↗
(mark, box, filter, hits)

Source from the content-addressed store, hash-verified

102659}
102660
102661function intersectMark(mark, box, filter, hits) {
102662 if (visitMark(mark, box, filter)) {
102663 const items = mark.items,
102664 type = mark.marktype,
102665 n = items.length;
102666 let i = 0;
102667
102668 if (type === 'group') {
102669 for (; i < n; ++i) {
102670 intersectGroup(items[i], box, filter, hits);
102671 }
102672 } else {
102673 for (const test = _index.default[type].isect; i < n; ++i) {
102674 let item = items[i];
102675 if (intersectItem(item, box, test)) hits.push(item);
102676 }
102677 }
102678 }
102679
102680 return hits;
102681}
102682
102683function visitMark(mark, box, filter) {
102684 // process if bounds intersect and if

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