* Set data in a surface's data model
(surfaceId: string, path: string, value: DataValue)
| 888 | * Set data in a surface's data model |
| 889 | */ |
| 890 | setData(surfaceId: string, path: string, value: DataValue): boolean { |
| 891 | const surface = this.surfaces.get(surfaceId); |
| 892 | if (!surface) { |
| 893 | return false; |
| 894 | } |
| 895 | |
| 896 | const result = setData(surface.dataModel, path, value); |
| 897 | |
| 898 | if (result && surface.rootComponentId) { |
| 899 | const streamingState = this.streamingStates.get(surfaceId); |
| 900 | this.rebuildComponentTree(surface, streamingState); |
| 901 | this.notifyListeners(surfaceId, surface); |
| 902 | } |
| 903 | |
| 904 | return result; |
| 905 | } |
| 906 | |
| 907 | /** |
| 908 | * Add data to a surface's data model |
no test coverage detected