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 2019/01/12 17:28:41 UTC

[incubator-echarts] 03/03: Fix that emphasis listener added repeatly.

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

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

commit 36a30dfeedcfc536e6b1e4fd5bbe008c85e7dae4
Author: sushuang <su...@gmail.com>
AuthorDate: Sun Jan 13 01:28:17 2019 +0800

    Fix that emphasis listener added repeatly.
---
 src/chart/map/MapView.js |  2 ++
 test/map.html            | 21 +++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/chart/map/MapView.js b/src/chart/map/MapView.js
index b128f6a..bcf9694 100644
--- a/src/chart/map/MapView.js
+++ b/src/chart/map/MapView.js
@@ -224,6 +224,8 @@ function enterRegionHighDown(highDownRecord, toHighOrDown) {
             text: labelModel.get('show') ? normalText : null,
             textPosition: labelModel.getShallow('position') || 'bottom'
         }, {isRectText: true, useInsideStyle: false});
+        // Trigger normalize style like padding.
+        circle.dirty(false);
 
         if (circle.__mapOriginalZ2 != null) {
             circle.z2 = circle.__mapOriginalZ2;
diff --git a/test/map.html b/test/map.html
index 52ce549..d3e8493 100644
--- a/test/map.html
+++ b/test/map.html
@@ -32,7 +32,7 @@ under the License.
     </head>
     <body>
 
-        <!-- <div id="main0"></div> -->
+        <div id="main0"></div>
         <div id="main1"></div>
 
 
@@ -61,8 +61,7 @@ under the License.
                     var option = {
                         tooltip: {},
                         title : {
-                            text: '内蒙古和青海没数据也要能被选中',
-                            subtext: '纯属虚构',
+                            text: '内蒙古 青海 没数据也要能被选中',
                             left: 'center'
                         },
                         legend: {
@@ -182,7 +181,7 @@ under the License.
                                     {name: '浙江',value: Math.round(Math.random()*1000)},
                                     {name: '江西',value: Math.round(Math.random()*1000)},
                                     {name: '山西',value: Math.round(Math.random()*1000)},
-                                    {name: '内蒙古',value: Math.round(Math.random()*1000)},
+                                    // {name: '内蒙古',value: 891},
                                     {name: '吉林',value: Math.round(Math.random()*1000)},
                                     {name: '福建',value: Math.round(Math.random()*1000)},
                                     {name: '广东',value: Math.round(Math.random()*1000)},
@@ -316,8 +315,11 @@ under the License.
                                     },
                                 },
                                 data:[
-                                    {name: '北京',value: 234},
-                                    {name: '天津',value: 432}
+                                    {name: '北京', value: 234},
+                                    {name: '天津', value: 432},
+                                    {name: '新疆', value: 100},
+                                    {name: '陕西', value: 77},
+                                    {name: '西藏', value: 101},
                                 ]
                             },
                             {
@@ -346,12 +348,15 @@ under the License.
                                 emphasis: {
                                     label: {
                                         show: true,
-                                        backgroundColor: '#ccc'
+                                        backgroundColor: '#fcf'
                                     }
                                 },
                                 data:[
                                     {name: '北京',value: 567},
-                                    {name: '河北',value: 321}
+                                    {name: '河北',value: 321},
+                                    {name: '新疆', value: 100},
+                                    {name: '内蒙古', value: 99},
+                                    {name: '西藏', value: 101}
                                 ]
                             }
                         ]


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