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/09/03 14:06:53 UTC

[incubator-echarts] branch master updated: 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


The following commit(s) were added to refs/heads/master by this push:
     new af2f439  tweak.
af2f439 is described below

commit af2f4391ae63724b654d4e4390bfa37ccb0fdf4b
Author: sushuang <su...@gmail.com>
AuthorDate: Mon Sep 3 22:06:37 2018 +0800

    tweak.
---
 .eslintrc.yaml                                |  2 +-
 src/component/axisPointer/AxisPointerModel.js |  2 +-
 src/component/tooltip/TooltipContent.js       | 14 +++++++-------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index 9126a59..93f28fc 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -173,7 +173,7 @@ rules:
     no-this-before-super: 1
     no-var: 0
     no-duplicate-imports: 1
-    prefer-rest-params: 2
+    prefer-rest-params: 0
     unicode-bom: 1
     max-statements-per-line: 2
 
diff --git a/src/component/axisPointer/AxisPointerModel.js b/src/component/axisPointer/AxisPointerModel.js
index e610aee..47a82fd 100644
--- a/src/component/axisPointer/AxisPointerModel.js
+++ b/src/component/axisPointer/AxisPointerModel.js
@@ -34,7 +34,7 @@ var AxisPointerModel = echarts.extendComponentModel({
         zlevel: 0,
         z: 50,
 
-        type: 'line',
+        type: 'line', // 'line' 'shadow' 'cross' 'none'.
         // axispointer triggered by tootip determine snap automatically,
         // see `modelHelper`.
         snap: false,
diff --git a/src/component/tooltip/TooltipContent.js b/src/component/tooltip/TooltipContent.js
index e9594df..87a2567 100644
--- a/src/component/tooltip/TooltipContent.js
+++ b/src/component/tooltip/TooltipContent.js
@@ -59,8 +59,8 @@ function assembleFont(textStyleModel) {
 
     cssText.push('font:' + textStyleModel.getFont());
 
-    fontSize &&
-        cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');
+    fontSize
+        && cssText.push('line-height:' + Math.round(fontSize * 3 / 2) + 'px');
 
     each(['decoration', 'align'], function (name) {
         var val = textStyleModel.get(name);
@@ -85,8 +85,8 @@ function assembleCssText(tooltipModel) {
     var padding = tooltipModel.get('padding');
 
     // Animation transition. Do not animate when transitionDuration is 0.
-    transitionDuration &&
-        cssText.push(assembleTransition(transitionDuration));
+    transitionDuration
+        && cssText.push(assembleTransition(transitionDuration));
 
     if (backgroundColor) {
         if (env.canvasSupported) {
@@ -106,8 +106,8 @@ function assembleCssText(tooltipModel) {
         var borderName = 'border-' + name;
         var camelCase = toCamelCase(borderName);
         var val = tooltipModel.get(camelCase);
-        val != null &&
-            cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));
+        val != null
+            && cssText.push(borderName + ':' + val + (name === 'color' ? '' : 'px'));
     });
 
     // Text style
@@ -215,7 +215,7 @@ TooltipContent.prototype = {
             + ';left:' + this._x + 'px;top:' + this._y + 'px;'
             + (tooltipModel.get('extraCssText') || '');
 
-        el.style.display = el.innerHTML ?  'block' : 'none';
+        el.style.display = el.innerHTML ? 'block' : 'none';
 
         // If mouse occsionally move over the tooltip, a mouseout event will be
         // triggered by canvas, and cuase some unexpectable result like dragging


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