MCPcopy Index your code
hub / github.com/microsoft/SandDance / transformPaths

Function transformPaths

docs/app/js/sanddance-app.js:130758–130765  ·  view source on GitHub ↗
(paths, grid, datum, _)

Source from the content-addressed store, hash-verified

130756 return _.resolve !== "shared" ? q : q(values.map((t)=>(0, _d3Array.max)(f(t).values)));
130757}
130758function transformPaths(paths, grid, datum, _) {
130759 let s = _.scale || grid.scale, t = _.translate || grid.translate;
130760 if ((0, _vegaUtil.isFunction)(s)) s = s(datum, _);
130761 if ((0, _vegaUtil.isFunction)(t)) t = t(datum, _);
130762 if ((s === 1 || s == null) && !t) return;
130763 const sx = ((0, _vegaUtil.isNumber)(s) ? s : s[0]) || 1, sy = ((0, _vegaUtil.isNumber)(s) ? s : s[1]) || 1, tx = t && t[0] || 0, ty = t && t[1] || 0;
130764 paths.forEach(transform(grid, sx, sy, tx, ty));
130765}
130766function transform(grid, sx, sy, tx, ty) {
130767 const x1 = grid.x1 || 0, y1 = grid.y1 || 0, flip = sx * sy < 0;
130768 function transformPolygon(coordinates) {

Callers 1

transformFunction · 0.70

Calls 2

transformFunction · 0.70
forEachMethod · 0.45

Tested by

no test coverage detected