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

Function shapeGenerator

docs/app/js/sanddance-app.js:131383–131394  ·  view source on GitHub ↗
(path, field, pointRadius)

Source from the content-addressed store, hash-verified

131381 }
131382});
131383function shapeGenerator(path, field, pointRadius) {
131384 const shape = pointRadius == null ? (_)=>path(field(_)) : (_)=>{
131385 var prev = path.pointRadius(), value = path.pointRadius(pointRadius)(field(_));
131386 path.pointRadius(prev);
131387 return value;
131388 };
131389 shape.context = (_)=>{
131390 path.context(_);
131391 return shape;
131392 };
131393 return shape;
131394}
131395/**
131396 * GeoJSON feature generator for creating graticules.
131397 * @constructor

Callers 1

transformFunction · 0.70

Calls 2

pathFunction · 0.70
fieldFunction · 0.70

Tested by

no test coverage detected