aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview/PresElementBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-10 22:25:37 -0500
committerbobzel <zzzman@gmail.com>2020-12-10 22:25:37 -0500
commit784d1bfccf65437942d4b7d373d5f1295eda8c87 (patch)
tree22e42a3e0d0a547d7fcf9e0817de5b56391fc349 /src/client/views/presentationview/PresElementBox.tsx
parent896db53261aca91de21eabfaa6fed0c1b27e3e51 (diff)
fixed infinite loop in treeView. changed styleProvider signature back to have an optional 'props'
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index 7eda04930..45d943bff 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -1,7 +1,7 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { action, computed, IReactionDisposer, reaction, runInAction, observable, trace } from "mobx";
import { observer } from "mobx-react";
-import { Doc, DataSym } from "../../../fields/Doc";
+import { Doc, DataSym, Opt } from "../../../fields/Doc";
import { documentSchema } from '../../../fields/documentSchemas';
import { Id } from "../../../fields/FieldSymbols";
import { createSchema, makeInterface } from '../../../fields/Schema';
@@ -77,7 +77,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
// embedWidth = () => this.props.PanelWidth();
// embedHeight = () => Math.min(this.props.PanelWidth() - 20, this.props.PanelHeight() - this.collapsedHeight);
embedWidth = (): number => this.props.PanelWidth() - 35;
- styleProvider = (doc: (Doc | undefined), props: DocumentViewProps, property: string): any => {
+ styleProvider = (doc: (Doc | undefined), props: Opt<DocumentViewProps>, property: string): any => {
if (property === "opacity") return 1;
return this.props.styleProvider?.(doc, props, property);
}