From 9b63097989d7a1bfb803b27935959945aacfae5f Mon Sep 17 00:00:00 2001 From: madelinegr Date: Sat, 2 Mar 2019 19:00:57 -0500 Subject: changing presentaiton view width --- src/client/views/PresentationView.tsx | 14 ++++++++++---- src/client/views/nodes/DocumentView.tsx | 3 --- 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 { } // finally, if it's a normal document, then render it as such. else { - return
  • //onClick={PresentationView.Instance.RemoveDoc(document)}> + //TODO: there is a zoom event that will be merged for on click + return
  • {title.Data}
  • ; } } @@ -84,7 +87,7 @@ export class PresentationView extends React.Component { } //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 { if (title && title !== "") { 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 ( -
    +

    {titleStr}

      >>>>>> bde8aabad7e5745b4797e73b564e4efb19faeca9 const JsxParser = require('react-jsx-parser').default;//TODO Why does this need to be imported like this? -- cgit v1.2.3-70-g09d2