aboutsummaryrefslogtreecommitdiff
path: root/src/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/nodes/ImageBox.tsx')
-rw-r--r--src/views/nodes/ImageBox.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/views/nodes/ImageBox.tsx b/src/views/nodes/ImageBox.tsx
index 1dfad462f..7577627e8 100644
--- a/src/views/nodes/ImageBox.tsx
+++ b/src/views/nodes/ImageBox.tsx
@@ -5,6 +5,8 @@ import { SelectionManager } from "../../util/SelectionManager";
import { DocumentFieldViewProps } from "./DocumentView";
import "./ImageBox.scss";
import React = require("react")
+import { ImageField } from '../../fields/ImageField';
+import { NumberField } from '../../fields/NumberField';
interface ImageBoxState {
photoIndex: number,
@@ -57,7 +59,12 @@ export class ImageBox extends React.Component<DocumentFieldViewProps, ImageBoxSt
}
render() {
- const images = [this.props.doc.GetTextField(this.props.fieldKey, ""),];
+ let field = this.props.doc.GetFieldT(this.props.fieldKey, ImageField);
+ let path = "";
+ if (field) {
+ path = field.Data.href;
+ }
+ const images = [path,];
var lightbox = () => {
const { photoIndex } = this.state;
if (this.state.isOpen && SelectionManager.IsSelected(this.props.containingDocumentView)) {