MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / cacheElementStl

Function cacheElementStl

libs/echarts/echarts-en.simple.js:17109–17135  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

17107}
17108
17109function cacheElementStl(el) {
17110 if (!el.__hoverStlDirty) {
17111 return;
17112 }
17113 el.__hoverStlDirty = false;
17114
17115 var hoverStyle = el.__hoverStl;
17116 if (!hoverStyle) {
17117 el.__cachedNormalStl = el.__cachedNormalZ2 = null;
17118 return;
17119 }
17120
17121 var normalStyle = el.__cachedNormalStl = {};
17122 el.__cachedNormalZ2 = el.z2;
17123 var elStyle = el.style;
17124
17125 for (var name in hoverStyle) {
17126 // See comment in `singleEnterEmphasis`.
17127 if (hoverStyle[name] != null) {
17128 normalStyle[name] = elStyle[name];
17129 }
17130 }
17131
17132 // Always cache fill and stroke to normalStyle for lifting color.
17133 normalStyle.fill = elStyle.fill;
17134 normalStyle.stroke = elStyle.stroke;
17135}
17136
17137function singleEnterEmphasis(el) {
17138 var hoverStl = el.__hoverStl;

Callers 1

singleEnterEmphasisFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected