Skip to content

Commit f71f579

Browse files
committed
curve: "projected"
1 parent d9f77f2 commit f71f579

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/marks/line.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ const defaults = {
2424
strokeMiterlimit: 1
2525
};
2626

27-
const curveProjection = Symbol("projection");
27+
const curveProjected = Symbol("projected");
2828

29-
// For the “projection” curve, return a symbol instead of a curve
29+
// For the “projected” curve, return a symbol instead of a curve
3030
// implementation; we’ll use d3.geoPath instead of d3.line to render.
3131
function LineCurve({curve, tension}) {
32-
return typeof curve !== "function" && `${curve}`.toLowerCase() === "projection"
33-
? curveProjection
32+
return typeof curve !== "function" && `${curve}`.toLowerCase() === "projected"
33+
? curveProjected
3434
: Curve(curve, tension);
3535
}
3636

@@ -41,8 +41,8 @@ export class Line extends Mark {
4141
super(
4242
data,
4343
{
44-
x: {value: x, scale: curve === curveProjection ? undefined : "x"}, // unscaled if projected
45-
y: {value: y, scale: curve === curveProjection ? undefined : "y"}, // unscaled if projected
44+
x: {value: x, scale: curve === curveProjected ? undefined : "x"}, // unscaled if projected
45+
y: {value: y, scale: curve === curveProjected ? undefined : "y"}, // unscaled if projected
4646
z: {value: maybeZ(options), optional: true}
4747
},
4848
options,
@@ -72,7 +72,7 @@ export class Line extends Mark {
7272
.call(applyGroupedMarkers, this, channels)
7373
.attr(
7474
"d",
75-
curve === curveProjection
75+
curve === curveProjected
7676
? sphereLine(context.projection, X, Y)
7777
: shapeLine()
7878
.curve(curve)

test/plots/beagle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default async function () {
1515
marks: [
1616
Plot.geo(land, {fill: "currentColor"}),
1717
Plot.graticule(),
18-
Plot.line(beagle, {stroke: (d, i) => i, z: null, curve: "projection"}),
18+
Plot.line(beagle, {stroke: (d, i) => i, z: null, curve: "projected"}),
1919
Plot.sphere()
2020
]
2121
});

0 commit comments

Comments
 (0)