Skip to content

Commit ce10d20

Browse files
committed
minimize diff
1 parent bc06f41 commit ce10d20

File tree

7 files changed

+3588
-3589
lines changed

7 files changed

+3588
-3589
lines changed

src/marks/link.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export class Link extends Mark {
3838
.data(index)
3939
.join("path")
4040
.call(applyDirectStyles, this)
41-
.call(applyChannelStyles, this, channels)
42-
.call(applyMarkers, this, channels)
4341
.attr("d", i => {
4442
const p = path();
4543
const c = curve(p);
@@ -48,7 +46,9 @@ export class Link extends Mark {
4846
c.point(X2[i], Y2[i]);
4947
c.lineEnd();
5048
return p;
51-
}))
49+
})
50+
.call(applyChannelStyles, this, channels)
51+
.call(applyMarkers, this, channels))
5252
.node();
5353
}
5454
}

src/marks/rule.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export class RuleX extends Mark {
4545
.data(index)
4646
.join("line")
4747
.call(applyDirectStyles, this)
48-
.call(applyChannelStyles, this, channels)
4948
.attr("x1", X ? i => X[i] : (marginLeft + width - marginRight) / 2)
5049
.attr("x2", X ? i => X[i] : (marginLeft + width - marginRight) / 2)
5150
.attr("y1", Y1 && !isCollapsed(y) ? i => Y1[i] + insetTop : marginTop + insetTop)
52-
.attr("y2", Y2 && !isCollapsed(y) ? (y.bandwidth ? i => Y2[i] + y.bandwidth() - insetBottom : i => Y2[i] - insetBottom) : height - marginBottom - insetBottom))
51+
.attr("y2", Y2 && !isCollapsed(y) ? (y.bandwidth ? i => Y2[i] + y.bandwidth() - insetBottom : i => Y2[i] - insetBottom) : height - marginBottom - insetBottom)
52+
.call(applyChannelStyles, this, channels))
5353
.node();
5454
}
5555
}
@@ -88,11 +88,11 @@ export class RuleY extends Mark {
8888
.data(index)
8989
.join("line")
9090
.call(applyDirectStyles, this)
91-
.call(applyChannelStyles, this, channels)
9291
.attr("x1", X1 && !isCollapsed(x) ? i => X1[i] + insetLeft : marginLeft + insetLeft)
9392
.attr("x2", X2 && !isCollapsed(x) ? (x.bandwidth ? i => X2[i] + x.bandwidth() - insetRight : i => X2[i] - insetRight) : width - marginRight - insetRight)
9493
.attr("y1", Y ? i => Y[i] : (marginTop + height - marginBottom) / 2)
95-
.attr("y2", Y ? i => Y[i] : (marginTop + height - marginBottom) / 2))
94+
.attr("y2", Y ? i => Y[i] : (marginTop + height - marginBottom) / 2)
95+
.call(applyChannelStyles, this, channels))
9696
.node();
9797
}
9898
}

test/output/aaplCandlestick.svg

Lines changed: 120 additions & 120 deletions
Loading

test/output/seattlePrecipitationRule.svg

Lines changed: 1461 additions & 1461 deletions
Loading

test/output/seattleTemperatureBand.svg

Lines changed: 1461 additions & 1461 deletions
Loading

test/output/usPresidentialForecast2016.svg

Lines changed: 539 additions & 539 deletions
Loading

test/plot.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ function reindexStyle(root) {
6565
}
6666
}
6767

68-
// TODO replace iris url(#plot-1)
6968
function reindexMarker(root) {
7069
let index = 0;
7170
const map = new Map();

0 commit comments

Comments
 (0)