diff options
Diffstat (limited to 'src/client/views/PresentationView.tsx')
-rw-r--r-- | src/client/views/PresentationView.tsx | 14 |
1 files changed, 10 insertions, 4 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 |