MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / rollbackDefaultTextStyle

Function rollbackDefaultTextStyle

libs/echarts/echarts.simple.js:17875–17884  ·  view source on GitHub ↗

* Consider the case: in a scatter, * label: { * normal: {position: 'inside'}, * emphasis: {position: 'top'} * } * In the normal state, the `textFill` will be set as '#fff' for pretty view (see * `applyDefaultTextStyle`), but when switching to emphasis state, the `textFill` * should be

(style)

Source from the content-addressed store, hash-verified

17873 * should be retured to 'autoColor', but not keep '#fff'.
17874 */
17875function rollbackDefaultTextStyle(style) {
17876 var insideRollback = style.insideRollback;
17877 if (insideRollback) {
17878 // Reset all of the props in `CACHED_LABEL_STYLE_PROPERTIES`.
17879 style.textFill = insideRollback.textFill;
17880 style.textStroke = insideRollback.textStroke;
17881 style.textStrokeWidth = insideRollback.textStrokeWidth;
17882 style.insideRollback = null;
17883 }
17884}
17885
17886function getFont(opt, ecModel) {
17887 var gTextStyleModel = ecModel && ecModel.getModel('textStyle');

Callers 3

singleEnterEmphasisFunction · 0.70
singleEnterNormalFunction · 0.70
modifyLabelStyleFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected