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

Function getForce

docs/app/js/sanddance-app.js:135684–135690  ·  view source on GitHub ↗
(_)

Source from the content-addressed store, hash-verified

135682 return 0;
135683}
135684function getForce(_) {
135685 var f, p;
135686 if (!(0, _vegaUtil.hasOwnProperty)(ForceMap, _.force)) (0, _vegaUtil.error)("Unrecognized force: " + _.force);
135687 f = ForceMap[_.force]();
135688 for(p in _)if ((0, _vegaUtil.isFunction)(f[p])) setForceParam(f[p], _[p], _);
135689 return f;
135690}
135691function setForceParam(f, v, _) {
135692 f((0, _vegaUtil.isFunction)(v) ? (d)=>v(d, _) : v);
135693}

Callers 1

setupFunction · 0.70

Calls 1

setForceParamFunction · 0.70

Tested by

no test coverage detected