(seriesModel: GraphSeriesModel, ecModel: GlobalModel, api: ExtensionAPI)
| 97 | } |
| 98 | |
| 99 | render(seriesModel: GraphSeriesModel, ecModel: GlobalModel, api: ExtensionAPI) { |
| 100 | const ownCoordSys = getOwnRoamViewCoordSys(seriesModel); |
| 101 | let isForceLayout = false; |
| 102 | |
| 103 | this._model = seriesModel; |
| 104 | this._api = api; |
| 105 | this._active = true; |
| 106 | const mainGroup = this._mainGroup; |
| 107 | |
| 108 | const thumbnailInfo = this._getThumbnailInfo(); |
| 109 | if (thumbnailInfo) { |
| 110 | thumbnailInfo.bridge.reset(api); |
| 111 | } |
| 112 | |
| 113 | const symbolDraw = this._symbolDraw; |
| 114 | const lineDraw = this._lineDraw; |
| 115 | if (ownCoordSys) { |
| 116 | applyViewCoordSysTransToElement( |
| 117 | mainGroup, |
| 118 | VIEW_COORD_SYS_TRANS_OVERALL, |
| 119 | ownCoordSys, |
| 120 | this._firstRender ? null : seriesModel, |
| 121 | ); |
| 122 | } |
| 123 | // Fix edge contact point with node |
| 124 | adjustEdge(seriesModel.getGraph(), getNodeGlobalScale(seriesModel)); |
| 125 | |
| 126 | const data = seriesModel.getData(); |
| 127 | symbolDraw.updateData(data as ListForSymbolDraw); |
| 128 | |
| 129 | const edgeData = seriesModel.getEdgeData(); |
| 130 | // TODO: TYPE |
| 131 | lineDraw.updateData(edgeData as SeriesData); |
| 132 | |
| 133 | this._updateNodeAndLinkScale(); |
| 134 | |
| 135 | if (ownCoordSys) { |
| 136 | updateRoamControllerSimply( |
| 137 | seriesModel, |
| 138 | api, |
| 139 | this._controller, |
| 140 | function (e, x, y) { |
| 141 | return seriesModel.coordinateSystem.containPoint([x, y]); |
| 142 | }, |
| 143 | null, |
| 144 | ); |
| 145 | } |
| 146 | |
| 147 | clearTimeout(this._layoutTimeout); |
| 148 | const forceLayout = seriesModel.forceLayout; |
| 149 | const layoutAnimation = seriesModel.get(['force', 'layoutAnimation']); |
| 150 | if (forceLayout) { |
| 151 | isForceLayout = true; |
| 152 | this._startForceLayoutIteration(forceLayout, api, layoutAnimation); |
| 153 | } |
| 154 | |
| 155 | const layout = seriesModel.get('layout'); |
| 156 |
nothing calls this directly
no test coverage detected