MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / findEnclosingPathForLine

Function findEnclosingPathForLine

lib/web/brackets.js:366–379  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

364}
365
366function findEnclosingPathForLine(line) {
367 var found = null;
368 raph.forEach(function (e) {
369 if ("isHandleDecorator" in e) {
370 if (cmGetLineNumber(e.h1) <= line && cmGetLineNumber(e.h2) >= line) {
371 if (found == null)
372 found = e;
373 else if (Math.abs(cmGetLineNumber(found.h1) - cmGetLineNumber(found.h2)) > Math.abs(cmGetLineNumber(e.h1) - cmGetLineNumber(e.h2)))
374 found = e
375 }
376 }
377 });
378 return found;
379}
380
381raph.clear();
382

Callers 7

brackets.jsFile · 0.85
setFunction · 0.85
insertFloatSliderFunction · 0.85
insertXYSliderFunction · 0.85
insert4GraphSliderFunction · 0.85
insert14GraphSliderFunction · 0.85
insertBoolFunction · 0.85

Calls 2

cmGetLineNumberFunction · 0.85
forEachMethod · 0.45

Tested by

no test coverage detected