diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-06 20:07:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-06 20:07:08 -0400 |
| commit | 8825340031b7c639271967ba23191c968e57c411 (patch) | |
| tree | edb4dd5e7c19da62322bc8dff1fb10736d821c25 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 318f2bab4f086ce626fc3f1d099d1a09e245f95d (diff) | |
| parent | 7566ab0811a2503936f0a2e9a803db422dc1d44f (diff) | |
Merge pull request #502 from browngraphicslab/presentation_updates
Presentation trails merge changes + commenting
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index ffeb3024d..5b1f3c01c 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1495,33 +1495,18 @@ interface CollectionFreeFormViewPannableContentsProps { @observer class CollectionFreeFormViewPannableContents extends React.Component<CollectionFreeFormViewPannableContentsProps>{ @computed get zoomProgressivize() { - if (this.props.zoomProgressivize) { - console.log("should render"); - return ( - <> - {PresBox.Instance.zoomProgressivizeContainer} - </> - ); - } + return PresBox.Instance && this.props.zoomProgressivize ? PresBox.Instance.zoomProgressivizeContainer : (null); } @computed get progressivize() { - if (this.props.progressivize) { - console.log("should render"); - return ( - <> - {PresBox.Instance.progressivizeChildDocs} - </> - ); - } + return PresBox.Instance && this.props.progressivize ? PresBox.Instance.progressivizeChildDocs : (null); } @computed get presPaths() { const presPaths = "presPaths" + (this.props.presPaths ? "" : "-hidden"); - if (this.props.presPaths) { - return ( - <> - <div>{PresBox.Instance.order}</div> + if (PresBox.Instance) return ( + <> + {!this.props.presPaths ? (null) : <><div>{PresBox.Instance.order}</div> <svg className={presPaths}> <defs> <marker id="arrow" markerWidth="3" overflow="visible" markerHeight="3" refX="5" refY="5" orient="auto" markerUnits="strokeWidth"> @@ -1542,10 +1527,9 @@ class CollectionFreeFormViewPannableContents extends React.Component<CollectionF </marker> </defs>; {PresBox.Instance.paths} - </svg> - </> - ); - } + </svg></>} + </> + ); } render() { |
