MCPcopy Create free account
hub / github.com/apache/echarts / getFixedItemStyle

Function getFixedItemStyle

src/component/helper/MapDraw.ts:97–108  ·  view source on GitHub ↗
(model: Model<GeoItemStyleOption>)

Source from the content-addressed store, hash-verified

95
96
97function getFixedItemStyle(model: Model<GeoItemStyleOption>) {
98 const itemStyle = model.getItemStyle();
99 const areaColor = model.get('areaColor');
100
101 // If user want the color not to be changed when hover,
102 // they should both set areaColor and color to be null.
103 if (areaColor != null) {
104 itemStyle.fill = areaColor;
105 }
106
107 return itemStyle;
108}
109// Only stroke can be used for line.
110// Using fill in style if stroke not exits.
111// TODO Not sure yet. Perhaps a separate `lineStyle`?

Callers 1

Calls 2

getItemStyleMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected