You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2019/09/03 06:32:37 UTC

[incubator-echarts] 01/01: fix(svg): svg doesn't support addHover; fix #11054

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

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

commit e2ef4009ad41ba94480b6a6302c3ea318c143010
Author: Ovilia <zw...@gmail.com>
AuthorDate: Tue Sep 3 14:30:34 2019 +0800

    fix(svg): svg doesn't support addHover; fix #11054
---
 src/util/graphic.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/util/graphic.js b/src/util/graphic.js
index 110288a..02ecb58 100644
--- a/src/util/graphic.js
+++ b/src/util/graphic.js
@@ -287,6 +287,12 @@ function singleEnterEmphasis(el) {
 
     if (useHoverLayer) {
         elTarget = zr.addHover(el);
+
+        if (elTarget == null) {
+            // Ignore renderers like SVG which doesn't implement addHover
+            return;
+        }
+
         targetStyle = elTarget.style;
     }
 


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