MCPcopy
hub / github.com/apache/echarts / render

Method render

src/chart/map/MapView.ts:39–86  ·  view source on GitHub ↗
(
        mapModel: MapSeries,
        ecModel: GlobalModel,
        api: ExtensionAPI,
        payload: Payload
    )

Source from the content-addressed store, hash-verified

37 private _mapDraw: MapDraw;
38
39 render(
40 mapModel: MapSeries,
41 ecModel: GlobalModel,
42 api: ExtensionAPI,
43 payload: Payload
44 ): void {
45 // Not render if it is an toggleSelect action from self
46 if (payload && payload.type === 'mapToggleSelect'
47 && payload.from === this.uid
48 ) {
49 return;
50 }
51
52 const group = this.group;
53 group.removeAll();
54
55 if (mapModel.getHostGeoModel()) {
56 return;
57 }
58
59 let mapDraw = this._mapDraw;
60 if (mapDraw && payload && payload.type === 'geoRoam') {
61 mapDraw.resetForLabelLayout();
62 }
63
64 // Not update map if it is an roam action from self
65 if (!(payload && payload.type === 'geoRoam'
66 && payload.componentType === 'series'
67 && payload.seriesId === mapModel.id
68 )
69 ) {
70 if (mapSeriesNeedsDrawMap(mapModel)) {
71 mapDraw = mapDraw || (this._mapDraw = new MapDraw(api));
72 group.add(mapDraw.group);
73
74 mapDraw.draw(mapModel, ecModel, api, this, payload);
75 }
76 else {
77 this._clearMapDraw();
78 }
79 }
80 else {
81 mapDraw && group.add(mapDraw.group);
82 }
83
84 mapModel.get('showLegendSymbol') && ecModel.getComponent('legend')
85 && this._renderSymbols(mapModel);
86 }
87
88 /**
89 * @implements RoamHostView['__updateOnOwnRoam']

Callers

nothing calls this directly

Calls 9

_clearMapDrawMethod · 0.95
_renderSymbolsMethod · 0.95
mapSeriesNeedsDrawMapFunction · 0.90
getHostGeoModelMethod · 0.80
resetForLabelLayoutMethod · 0.80
getComponentMethod · 0.80
drawMethod · 0.65
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected