diff options
| author | bob <bcz@cs.brown.edu> | 2019-05-02 16:19:07 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-05-02 16:19:07 -0400 |
| commit | a78282cdf7fbb99386484640e1fb89d4b9b0cbee (patch) | |
| tree | 9154148f03f996e5c6fb8c2e367df13736d8b0cc /src/client/views/nodes | |
| parent | a79bda7e5c7e77e398a33b8262f861155c5f1462 (diff) | |
fixed some things with trees and summaries.
Diffstat (limited to 'src/client/views/nodes')
| -rw-r--r-- | src/client/views/nodes/DocumentContentsView.tsx | 3 | ||||
| -rw-r--r-- | src/client/views/nodes/FieldView.tsx | 11 | ||||
| -rw-r--r-- | src/client/views/nodes/ImageBox.scss | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx index 24e8a36ae..ddfe79a5c 100644 --- a/src/client/views/nodes/DocumentContentsView.tsx +++ b/src/client/views/nodes/DocumentContentsView.tsx @@ -15,6 +15,7 @@ import { IconBox } from "./IconBox"; import { KeyValueBox } from "./KeyValueBox"; import { PDFBox } from "./PDFBox"; import { VideoBox } from "./VideoBox"; +import { FieldView } from "./FieldView"; import { WebBox } from "./WebBox"; import { HistogramBox } from "../../northstar/dash-nodes/HistogramBox"; import React = require("react"); @@ -63,7 +64,7 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & { render() { return <JsxParser - components={{ FormattedTextBox, ImageBox, IconBox, CollectionFreeFormView, CollectionDockingView, CollectionSchemaView, CollectionView, CollectionPDFView, CollectionVideoView, WebBox, KeyValueBox, PDFBox, VideoBox, AudioBox, HistogramBox }} + components={{ FormattedTextBox, ImageBox, IconBox, FieldView, CollectionFreeFormView, CollectionDockingView, CollectionSchemaView, CollectionView, CollectionPDFView, CollectionVideoView, WebBox, KeyValueBox, PDFBox, VideoBox, AudioBox, HistogramBox }} bindings={this.CreateBindings()} jsx={this.finalLayout} showWarnings={true} diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx index 63009f2db..a1e083b36 100644 --- a/src/client/views/nodes/FieldView.tsx +++ b/src/client/views/nodes/FieldView.tsx @@ -57,12 +57,12 @@ export class FieldView extends React.Component<FieldViewProps> { } render() { const field = this.field; - if (!field) { + if (field === undefined) { return <p>{'<null>'}</p>; } - if (typeof field === "string") { - return <p>{field}</p>; - } + // if (typeof field === "string") { + // return <p>{field}</p>; + // } else if (field instanceof RichTextField) { return <FormattedTextBox {...this.props} />; } @@ -108,9 +108,6 @@ export class FieldView extends React.Component<FieldViewProps> { // else if (field instanceof HtmlField) { // return <WebBox {...this.props} /> // } - else if (typeof field === "number") { - return <p>{field}</p>; - } else if (!(field instanceof Promise)) { return <p>{JSON.stringify(field)}</p>; } diff --git a/src/client/views/nodes/ImageBox.scss b/src/client/views/nodes/ImageBox.scss index 9fe211df0..2316a050e 100644 --- a/src/client/views/nodes/ImageBox.scss +++ b/src/client/views/nodes/ImageBox.scss @@ -10,6 +10,8 @@ } .imageBox-cont-interactive { pointer-events: all; + width:100%; + height:auto; } .imageBox-dot { |
