diff options
author | bob <bcz@cs.brown.edu> | 2019-02-05 11:51:59 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-02-05 11:51:59 -0500 |
commit | ea9f41a84a307343593245e6de0c721704dc60fa (patch) | |
tree | 4a4d12c2a1d7d1b0e44e578e02124269ee8c2d5d /src/views/nodes/ImageBox.tsx | |
parent | 46a3ba510a02464b27b806af8fd1131dbc3da242 (diff) |
more
Diffstat (limited to 'src/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/views/nodes/ImageBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/views/nodes/ImageBox.tsx b/src/views/nodes/ImageBox.tsx index cced95c89..dd201f20f 100644 --- a/src/views/nodes/ImageBox.tsx +++ b/src/views/nodes/ImageBox.tsx @@ -39,7 +39,7 @@ export class ImageBox extends React.Component<FieldViewProps, ImageBoxState> { onPointerDown = (e: React.PointerEvent): void => { if (Date.now() - this._lastTap < 300) { - if (e.buttons === 1 && this.props.documentViewContainer instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.documentViewContainer)) { + if (e.buttons === 1 && this.props.DocumentViewForField instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.DocumentViewForField)) { e.stopPropagation(); this._downX = e.clientX; this._downY = e.clientY; @@ -67,7 +67,7 @@ export class ImageBox extends React.Component<FieldViewProps, ImageBoxState> { const images = [path,]; var lightbox = () => { const { photoIndex } = this.state; - if (this.state.isOpen && this.props.documentViewContainer instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.documentViewContainer)) { + if (this.state.isOpen && this.props.DocumentViewForField instanceof CollectionFreeFormDocumentView && SelectionManager.IsSelected(this.props.DocumentViewForField)) { return (<Lightbox mainSrc={images[photoIndex]} nextSrc={photoIndex + 1 < images.length ? images[(photoIndex + 1) % images.length] : undefined} |