Skip to content

Commit 98562a3

Browse files
committed
fixed control flow in doFill
1 parent 3850289 commit 98562a3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/plugins/plugin.filler/filler.drawing.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ function doFill(ctx, cfg) {
2323
ctx.save();
2424

2525
let fillColor = below;
26-
if (property === 'x') {
27-
if (below !== above) {
26+
if (below !== above) {
27+
if (property === 'x') {
2828
clipVertical(ctx, target, area.top);
2929
fill(ctx, {line, target, color: above, scale, property});
3030
ctx.restore();
3131
ctx.save();
3232
clipVertical(ctx, target, area.bottom);
33-
}
34-
} else if (property === 'y') {
35-
if (below !== above) {
33+
} else if (property === 'y') {
3634
clipHorizontal(ctx, target, area.left);
3735
fill(ctx, {line, target, color: below, scale, property});
3836
ctx.restore();

0 commit comments

Comments
 (0)