aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/documents/Documents.ts3
-rw-r--r--src/client/views/Main.tsx2
-rw-r--r--src/client/views/PresentationView.tsx15
3 files changed, 11 insertions, 9 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index bcd08bafa..2ea3cdfdb 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -192,11 +192,12 @@ export namespace Documents {
return CollectionDocument(config, CollectionViewType.Docking, options, id)
}
+ /*
export function PresentationDocument(documents: Array<Document>, options: DocumentOptions, id?: string) {
let doc = GetCollectionPrototype().MakeDelegate(id);
setupOptions(doc, options);
doc.SetData(KeyStore.Data, documents, ListField);
doc.SetNumber(KeyStore.ViewType, CollectionViewType);
return doc;
- }
+ }*/
} \ No newline at end of file
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index be6fe304a..eac713387 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -132,7 +132,7 @@ Documents.initProtos(() => {
ContainingCollectionView={undefined} />
<DocumentDecorations />
<ContextMenu />
- <PresentationView Document={PresentationView.Instance} />
+ <PresentationView Document={} />
<div style={{ position: 'absolute', bottom: '0px', left: '0px', width: '150px' }} ref={imgRef} >
<button onPointerDown={onRowDown(addImageNode, imgRef)} onClick={addClick(addImageNode)}>Add Image</button></div>
<div style={{ position: 'absolute', bottom: '25px', left: '0px', width: '150px' }} ref={textRef}>
diff --git a/src/client/views/PresentationView.tsx b/src/client/views/PresentationView.tsx
index 0a9183023..d9d9715fc 100644
--- a/src/client/views/PresentationView.tsx
+++ b/src/client/views/PresentationView.tsx
@@ -18,10 +18,6 @@ export interface PresViewProps {
*/
class PresentationViewItem extends React.Component<PresViewProps> {
- //observable means render is re-called every time variable is changed
- @observable
- collapsed: boolean = false;
- //TODO: this var isn't needed
/**
* Renders a single child document. It will just append a list element.
@@ -58,6 +54,10 @@ class PresentationViewItem extends React.Component<PresViewProps> {
export class PresentationView extends React.Component<PresViewProps> {
public static Instance: PresentationView;
+ //observable means render is re-called every time variable is changed
+ @observable
+ collapsed: boolean = false;
+
/**
* Adds a document to the presentation view
**/
@@ -72,7 +72,7 @@ export class PresentationView extends React.Component<PresViewProps> {
}
//TODO: open presentation view if not already open
- Documents.PresentationView([], { width: 200, height: 200, title: "a feeform collection" })
+ this.collapsed = false;
}
/**
@@ -100,13 +100,14 @@ export class PresentationView extends React.Component<PresViewProps> {
}
render() {
- let titleStr = "";
+ let titleStr = "Title";
let title = this.props.Document.GetT<TextField>(KeyStore.Title, TextField);
if (title && title !== "<Waiting>") {
titleStr = title.Data;
}
+ let width = this.collapsed ? 0 : 100;
return (
- <div>
+ <div background-color="lightblue" max-width={width}>
<h3>{titleStr}</h3>
<ul className="no-indent">
<PresentationViewItem