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

Function boundTest

docs/app/js/sanddance-app.js:120212–120218  ·  view source on GitHub ↗
(scale, orient, tolerance)

Source from the content-addressed store, hash-verified

120210 return b.width() > 1 && b.height() > 1;
120211};
120212const boundTest = (scale, orient, tolerance)=>{
120213 var range = scale.range(), b = new (0, _vegaScenegraph.Bounds)();
120214 if (orient === Top || orient === Bottom) b.set(range[0], -Infinity, range[1], Infinity);
120215 else b.set(-Infinity, range[0], Infinity, range[1]);
120216 b.expand(tolerance || 1);
120217 return (item)=>b.encloses(item.bounds);
120218}; // reset all items to be fully opaque
120219const reset = (source)=>{
120220 source.forEach((item)=>item.opacity = 1);
120221 return source;

Callers 1

transformFunction · 0.70

Calls 1

setMethod · 0.45

Tested by

no test coverage detected