UNPKG

d3-jsnext

Version:
46 lines (37 loc) 1.18 kB
import { d3_target } from '../core/target'; import { d3_source } from '../core/source'; import { d3$geo$distance } from './distance'; import { d3$geo } from './geo'; var d3$geo$greatArc; // @deprecated use {type: "LineString"} or d3.geo.distance instead. d3$geo$greatArc = function() { var source = d3_source, source_, target = d3_target, target_; function greatArc() { return {type: "LineString", coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]}; } greatArc.distance = function() { return d3$geo$distance( source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ); }; greatArc.source = function(_) { if (!arguments.length) return source; source = _, source_ = typeof _ === "function" ? null : _; return greatArc; }; greatArc.target = function(_) { if (!arguments.length) return target; target = _, target_ = typeof _ === "function" ? null : _; return greatArc; }; greatArc.precision = function() { return arguments.length ? greatArc : 0; }; return greatArc; }; export { d3$geo$greatArc };