aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-02-22 10:07:26 -0500
committerbob <bcz@cs.brown.edu>2019-02-22 10:07:26 -0500
commit81511528e418c41332d06faea9c3287cf8abf553 (patch)
treee5e97573436257d79fa89172b11fac8546e0dd70 /src/client/views/DocumentDecorations.tsx
parent38ca0618dcdeb57d5a91557b392c1aff095868be (diff)
fixed some exceptions. fixed spurious context menu. fixed excessive rendering.
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx5
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",