MCPcopy Index your code
hub / github.com/plotly/plotly.js / unwrapLonRange

Function unwrapLonRange

src/lib/geo_location_utils.js:462–464  ·  view source on GitHub ↗

* Return an unwrapped version of a `[lon0, lon1]` longitude range. * When the range crosses the antimeridian (`lon0 > 0`, `lon1 < 0`), * 360 is added to `lon1` to produce a continuous range; * otherwise the input pair is returned unchanged. Function assumes * `lon0` is west of `lon1`. * * @exa

([lon0, lon1])

Source from the content-addressed store, hash-verified

460 * respected, `lon1` falls in the range `[lon0, lon0 + 360)`.
461 */
462function unwrapLonRange([lon0, lon1]) {
463 return [lon0, lon0 > 0 && lon1 < 0 ? lon1 + ANTIMERIDIAN_LON_SHIFT : lon1];
464}
465
466module.exports = {
467 locationToFeature,

Callers 3

handleGeoDefaultsFunction · 0.85
makeRangeBoxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…