You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/08/02 05:12:31 UTC

[echarts] branch master updated: support 'convertFromEC4CompatibleStyle' to convert font related attributes

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/master by this push:
     new 56ca64a  support 'convertFromEC4CompatibleStyle' to convert font related attributes
     new 997f839  Merge pull request #15454 from AmosChenYQ/fix-custom-series-label
56ca64a is described below

commit 56ca64ac07a6492ad8ba3f2bd447fbb86e95ab50
Author: AmosChenYQ <am...@foxmail.com>
AuthorDate: Sun Aug 1 01:09:21 2021 +0800

    support 'convertFromEC4CompatibleStyle' to convert font related attributes
---
 src/util/styleCompat.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/styleCompat.ts b/src/util/styleCompat.ts
index bcc817b..d70a601 100644
--- a/src/util/styleCompat.ts
+++ b/src/util/styleCompat.ts
@@ -85,6 +85,10 @@ export function convertFromEC4CompatibleStyle(hostStyle: ZRStyleProps, elType: s
         hasOwn(srcStyle, 'rich') && (textContentStyle.rich = srcStyle.rich);
         hasOwn(srcStyle, 'textFill') && (textContentStyle.fill = srcStyle.textFill);
         hasOwn(srcStyle, 'textStroke') && (textContentStyle.stroke = srcStyle.textStroke);
+        hasOwn(srcStyle, 'fontFamily') && (textContentStyle.fontFamily = srcStyle.fontFamily);
+        hasOwn(srcStyle, 'fontSize') && (textContentStyle.fontSize = srcStyle.fontSize);
+        hasOwn(srcStyle, 'fontStyle') && (textContentStyle.fontStyle = srcStyle.fontStyle);
+        hasOwn(srcStyle, 'fontWeight') && (textContentStyle.fontWeight = srcStyle.fontWeight);
 
         textContent = {
             type: 'text',

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