MCPcopy Create free account
hub / github.com/openscopeproject/InteractiveHtmlBom / bboxHitScan

Function bboxHitScan

InteractiveHtmlBom/web/render.js:794–805  ·  view source on GitHub ↗
(layer, x, y)

Source from the content-addressed store, hash-verified

792}
793
794function bboxHitScan(layer, x, y) {
795 var result = [];
796 for (var i = 0; i < pcbdata.footprints.length; i++) {
797 var footprint = pcbdata.footprints[i];
798 if (footprint.layer == layer) {
799 if (pointWithinFootprintBbox(x, y, footprint.bbox)) {
800 result.push(i);
801 }
802 }
803 }
804 return result;
805}
806
807function handlePointerDown(e, layerdict) {
808 if (e.button != 0 && e.button != 1) {

Callers 1

handleMouseClickFunction · 0.85

Calls 1

pointWithinFootprintBboxFunction · 0.85

Tested by

no test coverage detected