Skip to content

Commit

Permalink
default fill to none if stroke
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 10, 2021
1 parent 89023cb commit f8fd2e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/marks/area.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class Area extends Mark {
...options
} = {}
) {
const [vfill, cfill] = maybeColor(fill, "currentColor");
const [vstroke, cstroke] = maybeColor(stroke, "none");
const [vfill, cfill] = maybeColor(fill, cstroke === "none" ? "currentColor" : "none");
if (z === undefined && vfill != null) z = vfill;
if (z === undefined && vstroke != null) z = vstroke;
super(
Expand Down
2 changes: 1 addition & 1 deletion src/marks/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export class AbstractBar extends Mark {
...options
} = {}
) {
const [vfill, cfill] = maybeColor(fill, "currentColor");
const [vstroke, cstroke] = maybeColor(stroke, "none");
const [vfill, cfill] = maybeColor(fill, cstroke === "none" ? "currentColor" : "none");
super(
data,
[
Expand Down
2 changes: 1 addition & 1 deletion src/marks/rect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export class Rect extends Mark {
...options
} = {}
) {
const [vfill, cfill] = maybeColor(fill, "currentColor");
const [vstroke, cstroke] = maybeColor(stroke, "none");
const [vfill, cfill] = maybeColor(fill, cstroke === "none" ? "currentColor" : "none");
super(
data,
[
Expand Down

0 comments on commit f8fd2e5

Please sign in to comment.