pissang commented on a change in pull request #14214:
URL: https://github.com/apache/echarts/pull/14214#discussion_r571419673



##########
File path: src/label/labelStyle.ts
##########
@@ -421,6 +421,14 @@ function setTextStyleCommon(
     if (margin != null) {
         textStyle.margin = margin;
     }
+    const ellipsis = textStyleModel.get('ellipsis');
+    if (ellipsis) {
+        textStyle.ellipsis = ellipsis;
+    }
+    const lineOverflow = textStyleModel.get('lineOverflow');
+    if (lineOverflow) {
+        textStyle.lineOverflow = lineOverflow;

Review comment:
       Should always set value. Or it can't be restored to default if the 
`lineOverlow` is changed to null

##########
File path: src/component/tooltip/TooltipRichContent.ts
##########
@@ -106,7 +106,12 @@ class TooltipRichContent {
                 fill: tooltipModel.get(['textStyle', 'color']),
                 padding: getPaddingFromTooltipModel(tooltipModel, 'richText'),
                 verticalAlign: 'top',
-                align: 'left'
+                align: 'left',
+                width: +tooltipModel.get(['textStyle', 'width']) || null,
+                height: +tooltipModel.get(['textStyle', 'height']) || null,
+                overflow: tooltipModel.get(['textStyle', 'overflow']),
+                ellipsis: tooltipModel.get(['textStyle', 'ellipsis']),
+                lineOverflow: tooltipModel.get(['textStyle', 'lineOverflow'])

Review comment:
       Should get a `textStyleModel` if it's used frequently
   ```ts
   const textStyleModel = tooltipModel.getModel('textStyle');
   ```




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



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

Reply via email to