aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormadelinegr <mgriswold99@gmail.com>2019-03-02 19:00:57 -0500
committermadelinegr <mgriswold99@gmail.com>2019-03-02 19:00:57 -0500
commit9b63097989d7a1bfb803b27935959945aacfae5f (patch)
tree9a3364ba52954d9dd8b9a1928a4f4b8fa56d3781
parentb30d129dfd0f7c4a462a0af1dde13a9a0d1699fc (diff)
changing presentaiton view width
-rw-r--r--src/client/views/PresentationView.tsx14
-rw-r--r--src/client/views/nodes/DocumentView.tsx3
2 files changed, 10 insertions, 7 deletions
diff --git a/src/client/views/PresentationView.tsx b/src/client/views/PresentationView.tsx
index e8c86982d..eb8cf3a06 100644
--- a/src/client/views/PresentationView.tsx
+++ b/src/client/views/PresentationView.tsx
@@ -9,11 +9,13 @@ import { Field } from "../../fields/Field";
import { Documents } from '../documents/Documents';
import "./PresentationView.scss"
import { mobxPendingDecorators } from "mobx/lib/internal";
+import { NumberField } from "../../fields/NumberField";
export interface PresViewProps {
Document: Document;
}
+
@observer
/**
* Component that takes in a document prop and a boolean whether it's collapsed or not.
@@ -34,7 +36,8 @@ class PresentationViewItem extends React.Component<PresViewProps> {
}
// finally, if it's a normal document, then render it as such.
else {
- return <li className="presentationView-item" key={document.Id}> //onClick={PresentationView.Instance.RemoveDoc(document)}>
+ //TODO: there is a zoom event that will be merged for on click
+ return <li className="presentationView-item" key={document.Id}>
{title.Data}</li>;
}
}
@@ -84,7 +87,7 @@ export class PresentationView extends React.Component<PresViewProps> {
}
//TODO: open presentation view if not already open
- this.collapsed = false;
+ this.props.Document.SetData(KeyStore.Width, 300, NumberField);
}
/**
@@ -119,9 +122,12 @@ export class PresentationView extends React.Component<PresViewProps> {
if (title && title !== "<Waiting>") {
titleStr = title.Data;
}
- let width = this.collapsed ? 10 : 500;
+ //TODO: programmatically change width
+ let width = this.props.Document.GetNumber(KeyStore.Width, 0);
+ console.log(width);
+ console.log("width above!");
return (
- <div className="presentationView-cont" max-width={width}>
+ <div className="presentationView-cont" style={{ width: width }}>
<div className="presentationView-title"><h2>{titleStr}</h2></div>
<ul>
<PresentationViewItem
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 5110f404d..e2b3f9833 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -20,11 +20,8 @@ import { KeyValueBox } from "./KeyValueBox"
import { WebBox } from "../nodes/WebBox";
import "./DocumentView.scss";
import React = require("react");
-<<<<<<< HEAD
import { PresentationView } from "../PresentationView";
-=======
import { CollectionViewProps } from "../collections/CollectionViewBase";
->>>>>>> bde8aabad7e5745b4797e73b564e4efb19faeca9
const JsxParser = require('react-jsx-parser').default;//TODO Why does this need to be imported like this?