()
| 981 | } |
| 982 | |
| 983 | render() { |
| 984 | const { colorBin, columns, directColor, facetStyle, filter, hideAxes, hideLegend, scheme, signalValues, size, totalStyle, transform, chart, view } = this.state; |
| 985 | const insight: SandDance.specs.Insight = { |
| 986 | colorBin, |
| 987 | columns, |
| 988 | directColor, |
| 989 | facetStyle, |
| 990 | filter, |
| 991 | hideAxes, |
| 992 | hideLegend, |
| 993 | scheme, |
| 994 | signalValues, |
| 995 | size, |
| 996 | totalStyle, |
| 997 | transform, |
| 998 | chart, |
| 999 | view, |
| 1000 | }; |
| 1001 | |
| 1002 | const loaded = !!(this.state.columns && this.state.dataContent); |
| 1003 | |
| 1004 | const selectionState: SandDance.types.SelectionState = (this.viewer && this.viewer.getSelection()) || {}; |
| 1005 | const selectionSearch = selectionState && selectionState.search; |
| 1006 | |
| 1007 | const columnMapProps = this.getColumnMapBaseProps(); |
| 1008 | |
| 1009 | const datas: { [key: number]: object[] } = {}; |
| 1010 | datas[DataScopeId.AllData] = this.state.dataContent && this.state.dataContent.data; |
| 1011 | datas[DataScopeId.FilteredData] = this.state.filteredData; |
| 1012 | datas[DataScopeId.SelectedData] = selectionState && selectionState.selectedData; |
| 1013 | |
| 1014 | if (this.state.calculating) { |
| 1015 | requestAnimationFrame(() => { |
| 1016 | //allow render to complete |
| 1017 | if (this.state.calculating) { |
| 1018 | this.state.calculating(); |
| 1019 | this.setState({ calculating: null }); |
| 1020 | } |
| 1021 | }); |
| 1022 | } |
| 1023 | |
| 1024 | const theme = this.props.theme || ''; |
| 1025 | const themePalette = themePalettes[theme]; |
| 1026 | |
| 1027 | return ( |
| 1028 | <div |
| 1029 | ref={div => { if (div) this.div = div; }} |
| 1030 | className={util.classList('sanddance-explorer', this.props.theme)} |
| 1031 | > |
| 1032 | <Topbar |
| 1033 | collapseLabels={this.props.compactUI} |
| 1034 | historyIndex={this.state.historyIndex} |
| 1035 | historyItems={this.state.historyItems} |
| 1036 | undo={() => this.undo()} |
| 1037 | redo={() => this.redo()} |
| 1038 | logoClickUrl={this.props.logoClickUrl} |
| 1039 | logoClickTarget={this.props.logoClickTarget} |
| 1040 | themePalette={themePalette} |
no test coverage detected