You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2018/12/04 15:57:47 UTC

[incubator-echarts] 04/04: Tweak.

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

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

commit a7f5d3c16745e61d57c23b22387c559ab9c7fd43
Author: sushuang <su...@gmail.com>
AuthorDate: Tue Dec 4 23:57:13 2018 +0800

    Tweak.
---
 src/coord/cartesian/Grid.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/coord/cartesian/Grid.js b/src/coord/cartesian/Grid.js
index ac45e9c..082e327 100644
--- a/src/coord/cartesian/Grid.js
+++ b/src/coord/cartesian/Grid.js
@@ -422,16 +422,14 @@ gridProto._initCartesian = function (gridModel, ecModel, api) {
                 // Fix position
                 if (axisPosition !== 'top' && axisPosition !== 'bottom') {
                     // Default bottom of X
-                    axisPosition = 'bottom';
-                    axisPosition = axisPositionUsed[axisPosition] ? 'top' : 'bottom';
+                    axisPosition = axisPositionUsed.bottom ? 'top' : 'bottom';
                 }
             }
             else {
                 // Fix position
                 if (axisPosition !== 'left' && axisPosition !== 'right') {
                     // Default left of Y
-                    axisPosition = 'left';
-                    axisPosition = axisPositionUsed[axisPosition] ? 'right' : 'left';
+                    axisPosition = axisPositionUsed.left ? 'right' : 'left';
                 }
             }
             axisPositionUsed[axisPosition] = true;


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