diff options
Diffstat (limited to 'src/client/views/nodes')
5 files changed, 12 insertions, 12 deletions
diff --git a/src/client/views/nodes/DataVizBox/components/Histogram.tsx b/src/client/views/nodes/DataVizBox/components/Histogram.tsx index 9e9a43b34..4a1fb2ed1 100644 --- a/src/client/views/nodes/DataVizBox/components/Histogram.tsx +++ b/src/client/views/nodes/DataVizBox/components/Histogram.tsx @@ -105,13 +105,13 @@ export class Histogram extends ObservableReactComponent<HistogramProps> { componentWillUnmount() { Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]()); } - componentDidMount = () => { + componentDidMount() { this._disposers.chartData = reaction( () => ({ dataSet: this._histogramData, w: this.width, h: this.height }), ({ dataSet, w, h }) => dataSet!.length > 0 && this.drawChart(dataSet, w, h), { fireImmediately: true } ); - }; + } @action restoreView = (data: Doc) => {}; diff --git a/src/client/views/nodes/DataVizBox/components/LineChart.tsx b/src/client/views/nodes/DataVizBox/components/LineChart.tsx index 50a8bf83d..2a9a8b354 100644 --- a/src/client/views/nodes/DataVizBox/components/LineChart.tsx +++ b/src/client/views/nodes/DataVizBox/components/LineChart.tsx @@ -89,7 +89,7 @@ export class LineChart extends ObservableReactComponent<LineChartProps> { componentWillUnmount() { Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]()); } - componentDidMount = () => { + componentDidMount() { this._disposers.chartData = reaction( () => ({ dataSet: this._lineChartData, w: this.width, h: this.height }), ({ dataSet, w, h }) => { @@ -124,7 +124,7 @@ export class LineChart extends ObservableReactComponent<LineChartProps> { }, { fireImmediately: true } ); - }; + } // anything that doesn't need to be recalculated should just be stored as drawCharts (i.e. computed values) and drawChart is gonna iterate over these observables and generate svgs based on that diff --git a/src/client/views/nodes/DataVizBox/components/PieChart.tsx b/src/client/views/nodes/DataVizBox/components/PieChart.tsx index e67556cd0..1259a13ff 100644 --- a/src/client/views/nodes/DataVizBox/components/PieChart.tsx +++ b/src/client/views/nodes/DataVizBox/components/PieChart.tsx @@ -91,13 +91,13 @@ export class PieChart extends ObservableReactComponent<PieChartProps> { componentWillUnmount() { Array.from(Object.keys(this._disposers)).forEach(key => this._disposers[key]()); } - componentDidMount = () => { + componentDidMount() { this._disposers.chartData = reaction( () => ({ dataSet: this._pieChartData, w: this.width, h: this.height }), ({ dataSet, w, h }) => dataSet!.length > 0 && this.drawChart(dataSet, w, h), { fireImmediately: true } ); - }; + } @action restoreView = (data: Doc) => {}; diff --git a/src/client/views/nodes/RadialMenu.tsx b/src/client/views/nodes/RadialMenu.tsx index 3b2fc033d..16450c359 100644 --- a/src/client/views/nodes/RadialMenu.tsx +++ b/src/client/views/nodes/RadialMenu.tsx @@ -86,7 +86,7 @@ export class RadialMenu extends React.Component { } @action - componentDidMount = () => { + componentDidMount() { document.addEventListener('pointerdown', this.onPointerDown); document.addEventListener('pointerup', this.onPointerUp); this.previewcircle(); @@ -94,7 +94,7 @@ export class RadialMenu extends React.Component { () => this._shouldDisplay, () => this._shouldDisplay && !this._mouseDown && runInAction(() => (this._display = true)) ); - }; + } componentDidUpdate = () => { this.previewcircle(); diff --git a/src/client/views/nodes/RadialMenuItem.tsx b/src/client/views/nodes/RadialMenuItem.tsx index 10a90befd..91dc37d34 100644 --- a/src/client/views/nodes/RadialMenuItem.tsx +++ b/src/client/views/nodes/RadialMenuItem.tsx @@ -17,13 +17,13 @@ export interface RadialMenuProps { @observer export class RadialMenuItem extends React.Component<RadialMenuProps> { - componentDidMount = () => { + componentDidMount() { this.setcircle(); - }; + } - componentDidUpdate = () => { + componentDidUpdate() { this.setcircle(); - }; + } handleEvent = async (e: React.PointerEvent) => { this.props.closeMenu && this.props.closeMenu(); |
