You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/02/16 04:37:42 UTC

[GitHub] [incubator-echarts] susiwen8 opened a new pull request #12155: Fix geo don't show again when show once set false

susiwen8 opened a new pull request #12155: Fix geo don't show again when show once set false
URL: https://github.com/apache/incubator-echarts/pull/12155
 
 
   <!-- Please fill in the following information to help us review your PR more efficiently. -->
   
   ## Brief Information
   
   This pull request is in the type of:
   
   - [ ] bug fixing
   - [ ] new feature
   - [ ] others
   
   
   
   ### What does this PR do?
   Just hide the map not remove it
   
   ### Fixed issues
   
   Close #12154 
   ## Details
   
   ### Before: What was the problem?
   
   Once geo.show was set to false, map would never show again
   
   ### After: How is it fixed in this PR?
   
   Map will show again when it was hide
   
   ## Usage
   
   ### Are there any API changes?
   
   - [ ] The API has been changed.
   
   <!-- LIST THE API CHANGES HERE -->
   
   
   
   ### Related test cases or examples to use the new APIs
   
   NA.
   
   
   
   ## Others
   
   ### Merging options
   
   - [ ] Please squash the commits into a single one when merge.
   
   ### Other information
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] susiwen8 commented on issue #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
susiwen8 commented on issue #12155: Fix geo don't show again when show once set false
URL: https://github.com/apache/incubator-echarts/pull/12155#issuecomment-590029069
 
 
   Hi @pissang Thanks for explanation!!!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] pissang commented on a change in pull request #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12155: Fix geo don't show again when show once set false
URL: https://github.com/apache/incubator-echarts/pull/12155#issuecomment-586668160
 
 
   Thanks for your contribution!
   The community will review it ASAP. In the meanwhile, please checkout [the coding standard](https://echarts.apache.org/en/coding-standard.html) and Wiki about [How to make a pull request](https://github.com/apache/incubator-echarts/wiki/How-to-make-a-pull-request).
   
   The pull request is marked to be `PR: author is committer` because you are a committer of this project.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
susiwen8 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_r379911544
 
 

 ##########
 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:
   Oh yeah, That make sense, because it was removed, so we need to create a new one

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] pissang commented on a change in pull request #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
susiwen8 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_r379911325
 
 

 ##########
 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:
   That means we should call `new MapDraw` on every update?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-echarts] susiwen8 closed pull request #12155: Fix geo don't show again when show once set false

Posted by GitBox <gi...@apache.org>.
susiwen8 closed pull request #12155:
URL: https://github.com/apache/incubator-echarts/pull/12155


   


----------------------------------------------------------------
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:
users@infra.apache.org



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