diff options
| author | tschicke-brown <tyler_schicke@brown.edu> | 2019-02-22 12:36:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-22 12:36:11 -0500 |
| commit | 85d7a3d9aee44f0b199dddace92f7a683bc33eb6 (patch) | |
| tree | 1128cba0e4532e1ca9ad5eba8c85cec1c74c2c5a /src/client/views/DocumentDecorations.tsx | |
| parent | 3f9e4363e6601eac175ff71192d414fd6051d921 (diff) | |
| parent | f58c27d102ffbe44eea09ff6e3900292d273a021 (diff) | |
Merge pull request #9 from browngraphicslab/collectionView
Added CollectionView
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 4e109d475..395a37ba5 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -5,6 +5,7 @@ import { observer } from "mobx-react"; import './DocumentDecorations.scss' import { KeyStore } from '../../fields/KeyStore' import { NumberField } from "../../fields/NumberField"; +import { number } from "prop-types"; @observer export class DocumentDecorations extends React.Component { @@ -142,6 +143,10 @@ export class DocumentDecorations extends React.Component { if (this.Hidden) { return (null); } + if (isNaN(bounds.r) || isNaN(bounds.b) || isNaN(bounds.x) || isNaN(bounds.y)) { + console.log("DocumentDecorations: Bounds Error") + return (null); + } return ( <div id="documentDecorations-container" style={{ width: (bounds.r - bounds.x + 40) + "px", |
