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_r381820526
 
 

 ##########
 File path: src/component/geo/GeoView.js
 ##########
 @@ -39,9 +39,10 @@ export default echarts.extendComponentView({
             return;
         }
 
-        var mapDraw = this._mapDraw;
         if (geoModel.get('show')) {
-            mapDraw.draw(geoModel, ecModel, api, this, payload);
+            this._mapDraw = new MapDraw(api, true);
+            this.group.add(this._mapDraw.group);
+            this._mapDraw.draw(geoModel, ecModel, api, this, payload);
 
 Review comment:
   Don't create MapDraw each render. It may cause performance issue since some 
diff optimization can't be applied.
   Also diff transition can't be applied.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to