You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by de...@apache.org on 2018/12/03 11:08:12 UTC

[incubator-echarts] branch master updated: refactor(grid): refactor the grid

This is an automated email from the ASF dual-hosted git repository.

deqingli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/master by this push:
     new 501c3b3  refactor(grid): refactor the grid
     new dbaea2d  Merge branch 'master' of https://github.com/apache/incubator-echarts
501c3b3 is described below

commit 501c3b35043de7d282534ed10719b9800fb4241a
Author: deqingli <an...@gmail.com>
AuthorDate: Mon Dec 3 19:06:22 2018 +0800

    refactor(grid): refactor the grid
---
 src/coord/cartesian/Grid.js | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/coord/cartesian/Grid.js b/src/coord/cartesian/Grid.js
index 458a166..d8389bf 100644
--- a/src/coord/cartesian/Grid.js
+++ b/src/coord/cartesian/Grid.js
@@ -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;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org