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

Function modifyLabelStyle

libs/echarts/echarts-en.simple.js:17539–17552  ·  view source on GitHub ↗

* Modify label style manually. * Only works after `setLabelStyle` and `setElementHoverStyle` called. * * @param {module:zrender/src/Element} el * @param {Object} [normalStyleProps] optional * @param {Object} [emphasisStyleProps] optional

(el, normalStyleProps, emphasisStyleProps)

Source from the content-addressed store, hash-verified

17537 * @param {Object} [emphasisStyleProps] optional
17538 */
17539function modifyLabelStyle(el, normalStyleProps, emphasisStyleProps) {
17540 var elStyle = el.style;
17541 if (normalStyleProps) {
17542 rollbackDefaultTextStyle(elStyle);
17543 el.setStyle(normalStyleProps);
17544 applyDefaultTextStyle(elStyle);
17545 }
17546 elStyle = el.__hoverStl;
17547 if (emphasisStyleProps && elStyle) {
17548 rollbackDefaultTextStyle(elStyle);
17549 extend(elStyle, emphasisStyleProps);
17550 applyDefaultTextStyle(elStyle);
17551 }
17552}
17553
17554/**
17555 * Set basic textStyle properties.

Callers

nothing calls this directly

Calls 4

rollbackDefaultTextStyleFunction · 0.70
applyDefaultTextStyleFunction · 0.70
extendFunction · 0.70
setStyleMethod · 0.45

Tested by

no test coverage detected