(model: Model<GeoItemStyleOption>)
| 95 | |
| 96 | |
| 97 | function 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`? |
no test coverage detected