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 2021/04/08 05:29:09 UTC

[GitHub] [echarts] pissang opened a new issue #14617: Clone label in LabelManager instead of using save and restore methods

pissang opened a new issue #14617:
URL: https://github.com/apache/echarts/issues/14617


   In https://github.com/apache/echarts/blob/d8d0ea69fb4c0df714a2c7390f88328d36d5456e/src/label/LabelManager.ts#L253 we save the label properties when the label has layout options so we can restore them later. It's not so robust because we can't make sure what we saved is right. In the case like zooming/panning maps. Each operation will trigger `label save` and cause original properties can't be restored.  Currently, we workaround by force reset necessary properties in https://github.com/apache/echarts/blob/d8d0ea69fb4c0df714a2c7390f88328d36d5456e/src/component/helper/MapDraw.ts#L542
   
   Perhaps it's better we can clone a new label and save the original label to avoid the LabelManager modify the original attributes.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


-- 
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