MCPcopy Create free account
hub / github.com/idank/explainshell / translateTo

Function translateTo

explainshell/web/static/js/d3.v3.js:1140–1144  ·  view source on GitHub ↗
(p, l)

Source from the content-addressed store, hash-verified

1138 scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
1139 }
1140 function translateTo(p, l) {
1141 l = point(l);
1142 translate[0] += p[0] - l[0];
1143 translate[1] += p[1] - l[1];
1144 }
1145 function rescale() {
1146 if (x1) x1.domain(x0.range().map(function(x) {
1147 return (x - translate[0]) / scale;

Callers 5

mousemoveFunction · 0.85
mousewheelFunction · 0.85
dblclickFunction · 0.85
touchstartFunction · 0.85
touchmoveFunction · 0.85

Calls 1

pointFunction · 0.85

Tested by

no test coverage detected