Skip to content

Commit

Permalink
axis对齐优化 #294
Browse files Browse the repository at this point in the history
  • Loading branch information
kener committed May 30, 2014
1 parent ab4aa4c commit 37fc620
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/component/axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,37 @@ define(function (require) {
case 'left' :
axShape.style = {
xStart : this.grid.getX() - halfLineWidth,
yStart : this.grid.getYend() + halfLineWidth,
yStart : this.grid.getYend(),
xEnd : this.grid.getX() - halfLineWidth,
yEnd : this.grid.getY() - halfLineWidth
yEnd : this.grid.getY(),
lineCap : 'round'
};
break;
case 'right' :
axShape.style = {
xStart : this.grid.getXend() + halfLineWidth,
yStart : this.grid.getYend() + halfLineWidth,
yStart : this.grid.getYend(),
xEnd : this.grid.getXend() + halfLineWidth,
yEnd : this.grid.getY() - halfLineWidth
yEnd : this.grid.getY(),
lineCap : 'round'
};
break;
case 'bottom' :
axShape.style = {
xStart : this.grid.getX() - halfLineWidth,
xStart : this.grid.getX(),
yStart : this.grid.getYend() + halfLineWidth,
xEnd : this.grid.getXend() + halfLineWidth,
yEnd : this.grid.getYend() + halfLineWidth
xEnd : this.grid.getXend(),
yEnd : this.grid.getYend() + halfLineWidth,
lineCap : 'round'
};
break;
case 'top' :
axShape.style = {
xStart : this.grid.getX() - halfLineWidth,
xStart : this.grid.getX(),
yStart : this.grid.getY() - halfLineWidth,
xEnd : this.grid.getXend() + halfLineWidth,
yEnd : this.grid.getY() - halfLineWidth
xEnd : this.grid.getXend(),
yEnd : this.grid.getY() - halfLineWidth,
lineCap : 'round'
};
break;
}
Expand Down

0 comments on commit 37fc620

Please sign in to comment.