提交 501c3b35 编写于 作者: D deqingli

refactor(grid): refactor the grid

上级 72245193
......@@ -423,9 +423,7 @@ gridProto._initCartesian = function (gridModel, ecModel, api) {
if (axisPosition !== 'top' && axisPosition !== 'bottom') {
// Default bottom of X
axisPosition = 'bottom';
if (axisPositionUsed[axisPosition]) {
axisPosition = axisPosition === 'top' ? 'bottom' : 'top';
}
axisPosition = axisPositionUsed[axisPosition] ? 'top' : 'bottom';
}
}
else {
......@@ -433,9 +431,7 @@ gridProto._initCartesian = function (gridModel, ecModel, api) {
if (axisPosition !== 'left' && axisPosition !== 'right') {
// Default left of Y
axisPosition = 'left';
if (axisPositionUsed[axisPosition]) {
axisPosition = axisPosition === 'left' ? 'right' : 'left';
}
axisPosition = axisPositionUsed[axisPosition] ? 'right' : 'left';
}
}
axisPositionUsed[axisPosition] = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册