plainheart commented on code in PR #20977:
URL: https://github.com/apache/echarts/pull/20977#discussion_r2093479570


##########
src/label/labelStyle.ts:
##########
@@ -395,15 +395,18 @@ function setTextStyleCommon(
     let richResult: TextStyleProps['rich'];
     if (richItemNames) {
         richResult = {};
+        const richInheritPlainLabel = 
textStyleModel.get('richInheritPlainLabel') !== false;
         for (const name in richItemNames) {
             if (richItemNames.hasOwnProperty(name)) {
                 // Cascade is supported in rich.
-                const richTextStyle = textStyleModel.getModel(['rich', name]);
+                const richTextStyle = textStyleModel.getModel(['rich', name], 
richInheritPlainLabel && textStyleModel);
                 // In rich, never `disableBox`.

Review Comment:
   For the sake of migration, I think supporting the global 
`richInheritPlainLabel` option makes sense, and the type is easy to define. But 
I hope to also support the `richInheritPlainLabel` option in `label` style, but 
keep it undocumented until it is required by developers.



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

Reply via email to