mustcanbedo commented on code in PR #21201:
URL: https://github.com/apache/echarts/pull/21201#discussion_r2382640911
##########
src/model/Global.ts:
##########
@@ -283,6 +283,13 @@ class GlobalModel extends Model<ECUnitOption> {
// If we really need to modify a props in each `MediaUnit['option']`,
use the full version
// (`{baseOption, media}`) in `setOption`.
// For `timeline`, the case is the same.
+ if (type === 'theme') {
+ const themeOption = this._theme.option;
+ if (themeOption) {
+ optionChanged = true;
+ this._mergeOption({ theme: themeOption }, opt);
+ }
+ }
Review Comment:
1. Whether the demand you proposed is necessary is actually reasonable; for
example, in the case raised by the bug reporter, when he just needed to change
the theme, all the data was lost.
2. There are indeed scenario issues with the current modification method.
3. The scenario issues can actually be resolved by modifying the mergeTheme;
the changes have now been submitted for another code review.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]