pissang commented on a change in pull request #12155: Fix geo don't show again 
when show once set false
URL: 
https://github.com/apache/incubator-echarts/pull/12155#discussion_r379887395
 
 

 ##########
 File path: src/component/geo/GeoView.js
 ##########
 @@ -39,12 +39,17 @@ export default echarts.extendComponentView({
             return;
         }
 
-        var mapDraw = this._mapDraw;
         if (geoModel.get('show')) {
-            mapDraw.draw(geoModel, ecModel, api, this, payload);
+            if (this._mapDraw.hasDraw) {
+                this._mapDraw.group.show();
+            }
+            else {
+                this._mapDraw.draw(geoModel, ecModel, api, this, payload);
 
 Review comment:
   We need to call the `draw` every time to update the map. In this way, it's 
only called the first time.
   
   We can fix this issue by adding the groups back every time in the code 
https://github.com/apache/incubator-echarts/blob/master/src/component/helper/MapDraw.js#L152
 . Now it is only been added on init.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to