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

Function zoom

docs/app/js/sanddance-app.js:106705–106711  ·  view source on GitHub ↗
(domain, anchor, scale, lift, ground)

Source from the content-addressed store, hash-verified

106703 return pan(domain, delta, symlog(constant1), symexp(constant1));
106704}
106705function zoom(domain, anchor, scale, lift, ground) {
106706 const d0 = lift(domain[0]), d1 = lift(peek(domain)), da = anchor != null ? lift(anchor) : (d0 + d1) / 2;
106707 return [
106708 ground(da + (d0 - da) * scale),
106709 ground(da + (d1 - da) * scale)
106710 ];
106711}
106712function zoomLinear(domain, anchor, scale) {
106713 return zoom(domain, anchor, scale, toNumber, identity);
106714}

Callers 4

zoomLinearFunction · 0.70
zoomLogFunction · 0.70
zoomPowFunction · 0.70
zoomSymlogFunction · 0.70

Calls 5

peekFunction · 0.70
coshFunction · 0.70
tanhFunction · 0.70
sinhFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected