(newState: State)
| 616 | public addHistory(historicInsight: Partial<HistoricInsight>, historyAction: HistoryAction, additionalUIState?: Partial<UIState>) { |
| 617 | |
| 618 | const setCleanState = (newState: State) => { |
| 619 | const cleanState = { ...newState, ...additionalUIState }; |
| 620 | if (!cleanState.note) { |
| 621 | cleanState.note = null; |
| 622 | } |
| 623 | delete cleanState.rebaseFilter; |
| 624 | |
| 625 | if (this.viewer) { |
| 626 | const { signalValues } = this.viewer.getInsight(); |
| 627 | cleanState.signalValues = { ...this.state.signalValues, ...signalValues, ...cleanState.signalValues }; |
| 628 | } |
| 629 | |
| 630 | this.setState(cleanState); |
| 631 | }; |
| 632 | |
| 633 | if (historyAction.omit) { |
| 634 | setCleanState(historicInsight as State); |
nothing calls this directly
no test coverage detected