aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FunctionPlotBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-13 21:17:50 -0500
committerbobzel <zzzman@gmail.com>2023-12-13 21:17:50 -0500
commit1cf241544f8063e3d71406238a584299b6ced794 (patch)
treecb2bf6a71abbe76e8e3ab8d6283c0daab850e0a4 /src/client/views/nodes/FunctionPlotBox.tsx
parent35f4d108643d310e4e9da107a5839bb74cc6706f (diff)
cleaned up props/_props handling by inherting from ObservableReactComponent
Diffstat (limited to 'src/client/views/nodes/FunctionPlotBox.tsx')
-rw-r--r--src/client/views/nodes/FunctionPlotBox.tsx14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/client/views/nodes/FunctionPlotBox.tsx b/src/client/views/nodes/FunctionPlotBox.tsx
index a04c27e01..29bffb583 100644
--- a/src/client/views/nodes/FunctionPlotBox.tsx
+++ b/src/client/views/nodes/FunctionPlotBox.tsx
@@ -1,15 +1,12 @@
import functionPlot from 'function-plot';
-import { action, computed, makeObservable, override, reaction } from 'mobx';
+import { computed, makeObservable, reaction } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, DocListCast } from '../../../fields/Doc';
-import { documentSchema } from '../../../fields/documentSchemas';
-import { Id } from '../../../fields/FieldSymbols';
import { List } from '../../../fields/List';
-import { createSchema, listSpec, makeInterface } from '../../../fields/Schema';
+import { listSpec } from '../../../fields/Schema';
import { Cast, StrCast } from '../../../fields/Types';
import { TraceMobx } from '../../../fields/util';
-import { copyProps } from '../../../Utils';
import { Docs } from '../../documents/Documents';
import { DragManager } from '../../util/DragManager';
import { undoBatch } from '../../util/UndoManager';
@@ -27,19 +24,12 @@ export class FunctionPlotBox extends ViewBoxAnnotatableComponent<FieldViewProps>
_plotId = '';
_plotEle: any;
- _prevProps: React.PropsWithChildren<FieldViewProps>;
- @override _props: React.PropsWithChildren<FieldViewProps>;
constructor(props: React.PropsWithChildren<FieldViewProps>) {
super(props);
- this._props = this._prevProps = props;
makeObservable(this);
this._plotId = 'graph' + FunctionPlotBox.GraphCount++;
}
- componentDidUpdate() {
- copyProps(this);
- }
-
componentDidMount() {
this._props.setContentView?.(this);
reaction(