Skip to content

Commit

Permalink
Merge pull request #17411 from wind108369/bugfix-single-inverse
Browse files Browse the repository at this point in the history
fix(axis): fix `inverse` option does not work for `singleAxis`
  • Loading branch information
plainheart authored Jul 22, 2022
2 parents 65d867e + a214eda commit 8cdcc7d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/coord/single/Single.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class Single implements CoordinateSystem, CoordinateSystemMaster {

const isHorizontal = axis.isHorizontal();
const extent = isHorizontal ? [0, rect.width] : [0, rect.height];
const idx = axis.reverse ? 1 : 0;
const idx = axis.inverse ? 1 : 0;

axis.setExtent(extent[idx], extent[1 - idx]);

Expand Down
2 changes: 0 additions & 2 deletions src/coord/single/SingleAxis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ class SingleAxis extends Axis {

orient: LayoutOrient;

reverse: boolean;

coordinateSystem: Single;

model: SingleAxisModel;
Expand Down

0 comments on commit 8cdcc7d

Please sign in to comment.