(ecModel: GlobalModel, api: ExtensionAPI)
| 82 | private _rect: LayoutRect; |
| 83 | |
| 84 | static create(ecModel: GlobalModel, api: ExtensionAPI) { |
| 85 | const matrixList: Matrix[] = []; |
| 86 | |
| 87 | ecModel.eachComponent('matrix', function (matrixModel: MatrixModel) { |
| 88 | const matrix = new Matrix(matrixModel, ecModel, api); |
| 89 | matrixList.push(matrix); |
| 90 | matrixModel.coordinateSystem = matrix; |
| 91 | }); |
| 92 | |
| 93 | // Inject coordinate system |
| 94 | // PENDING: optimize to not to travel all components? |
| 95 | // (collect relevant components in ecModel only when model update?) |
| 96 | ecModel.eachComponent((mainType, componentModel) => { |
| 97 | injectCoordSysByOption({ |
| 98 | targetModel: componentModel, |
| 99 | coordSysType: 'matrix', |
| 100 | coordSysProvider: simpleCoordSysInjectionProvider, |
| 101 | }); |
| 102 | }); |
| 103 | |
| 104 | return matrixList; |
| 105 | } |
| 106 | |
| 107 | constructor(matrixModel: MatrixModel, ecModel: GlobalModel, api: ExtensionAPI) { |
| 108 | this._model = matrixModel; |
nothing calls this directly
no test coverage detected