(graphicModel: GraphicComponentModel, ecModel: GlobalModel, api: ExtensionAPI)
| 86 | } |
| 87 | |
| 88 | render(graphicModel: GraphicComponentModel, ecModel: GlobalModel, api: ExtensionAPI): void { |
| 89 | // Having leveraged between use cases and algorithm complexity, a very |
| 90 | // simple layout mechanism is used: |
| 91 | // The size(width/height) can be determined by itself or its parent (not |
| 92 | // implemented yet), but can not by its children. (Top-down travel) |
| 93 | // The location(x/y) can be determined by the bounding rect of itself |
| 94 | // (can including its descendants or not) and the size of its parent. |
| 95 | // (Bottom-up travel) |
| 96 | |
| 97 | // When `chart.clear()` or `chart.setOption({...}, true)` with the same id, |
| 98 | // view will be reused. |
| 99 | if (graphicModel !== this._lastGraphicModel) { |
| 100 | this._clear(); |
| 101 | } |
| 102 | this._lastGraphicModel = graphicModel; |
| 103 | |
| 104 | this._updateElements(graphicModel); |
| 105 | this._relocate(graphicModel, api); |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * Update graphic elements. |
nothing calls this directly
no test coverage detected