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/01/08 03:30:54 UTC

[incubator-echarts] branch no-register-when-extend updated: feat: add state opt in createTextStyle export

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

shenyi pushed a commit to branch no-register-when-extend
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git


The following commit(s) were added to refs/heads/no-register-when-extend by this push:
     new 4383b3d  feat: add state opt in createTextStyle export
4383b3d is described below

commit 4383b3d260808e962ebb27a653483942d7a37a53
Author: pissang <bm...@gmail.com>
AuthorDate: Fri Jan 8 11:30:00 2021 +0800

    feat: add state opt in createTextStyle export
---
 src/export/api/helper.ts | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/export/api/helper.ts b/src/export/api/helper.ts
index d70390e..07d6cef 100644
--- a/src/export/api/helper.ts
+++ b/src/export/api/helper.ts
@@ -37,7 +37,7 @@ import SeriesModel from '../../model/Series';
 import { AxisBaseModel } from '../../coord/AxisBaseModel';
 import { getECData } from '../../util/innerStore';
 import { createTextStyle as innerCreateTextStyle } from '../../label/labelStyle';
-import { TextCommonOption } from '../../util/types';
+import { DisplayState, TextCommonOption } from '../../util/types';
 
 /**
  * Create a muti dimension List structure from seriesModel.
@@ -118,6 +118,13 @@ export {getECData};
 
 export {enableHoverEmphasis} from '../../util/states';
 
-export function createTextStyle(textStyleModel: Model<TextCommonOption>) {
-    return innerCreateTextStyle(textStyleModel);
+export function createTextStyle(
+    textStyleModel: Model<TextCommonOption>,
+    opts?: {
+        // For which state this textStyle is for.
+        state?: DisplayState
+    }
+) {
+    opts = opts || {};
+    return innerCreateTextStyle(textStyleModel, null, null, opts.state !== 'normal');
 }
\ No newline at end of file


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