MCPcopy Create free account
hub / github.com/plotly/plotly.js / findPolygonOffset

Function findPolygonOffset

src/plots/polar/helpers.js:178–189  ·  view source on GitHub ↗
(r, a0, a1, vangles)

Source from the content-addressed store, hash-verified

176}
177
178function findPolygonOffset(r, a0, a1, vangles) {
179 var minX = Infinity;
180 var minY = Infinity;
181 var vertices = makePolygon(r, a0, a1, vangles);
182
183 for(var i = 0; i < vertices.length; i++) {
184 var v = vertices[i];
185 minX = Math.min(minX, v[0]);
186 minY = Math.min(minY, -v[1]);
187 }
188 return [minX, minY];
189}
190
191/**
192 * find vertex angles (in 'vangles') the enclose angle 'a'

Callers

nothing calls this directly

Calls 1

makePolygonFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…