aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview/PresentationView.tsx
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-07-08 19:19:25 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-07-08 19:19:25 -0400
commitbfd6e4cfbe79f75ba68e94e29e858611ec8f9f9c (patch)
treed42c737b3307b50af7ef046c7ca23713fc4a72b4 /src/client/views/presentationview/PresentationView.tsx
parent288198ab8aa8127bb69928ab9a827af146287cb2 (diff)
SOme bugs fixed but still buggy
Diffstat (limited to 'src/client/views/presentationview/PresentationView.tsx')
-rw-r--r--src/client/views/presentationview/PresentationView.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx
index c1f5fac60..5db87a692 100644
--- a/src/client/views/presentationview/PresentationView.tsx
+++ b/src/client/views/presentationview/PresentationView.tsx
@@ -1,6 +1,6 @@
import { observer } from "mobx-react";
import React = require("react");
-import { observable, action, runInAction, reaction } from "mobx";
+import { observable, action, runInAction, reaction, autorun } from "mobx";
import "./PresentationView.scss";
import { DocumentManager } from "../../util/DocumentManager";
import { Utils } from "../../../Utils";
@@ -65,6 +65,7 @@ export class PresentationView extends React.Component<PresViewProps> {
constructor(props: PresViewProps) {
super(props);
PresentationView.Instance = this;
+ // autorun(() => console.log("Updated: ", this.presElementsMappings));
}
//The first lifecycle function that gets called to set up the current presentation.
@@ -327,6 +328,8 @@ export class PresentationView extends React.Component<PresViewProps> {
if (curDocPresId !== undefined) {
if (this.groupMappings.has(curDocPresId)) {
let currentDocGroup = this.groupMappings.get(curDocPresId)!;
+ Array.from(this.presElementsMappings.keys()).map(doc => console.log(doc[Id]));
+ console.log("\n");
currentDocGroup.forEach((doc: Doc, index: number) => {
let selectedButtons: boolean[] = this.presElementsMappings.get(doc)!.selected;
if (selectedButtons[buttonIndex.Navigate]) {
@@ -773,6 +776,7 @@ export class PresentationView extends React.Component<PresViewProps> {
addPressElem = (keyDoc: Doc, elem: PresentationElement) => {
this.presElementsMappings.set(keyDoc, elem);
+ // console.log(keyDoc, " : ", elem, " => ", this.presElementsMappings.size);
}
@@ -805,12 +809,13 @@ export class PresentationView extends React.Component<PresViewProps> {
deleteDocument={this.RemoveDoc}
gotoDocument={this.gotoDocument}
groupMappings={this.groupMappings}
- setPresElementsMappings={this.addPressElem}
+ PresElementsMappings={this.presElementsMappings}
setChildrenDocs={this.setChildrenDocs}
presStatus={this.presStatus}
presButtonBackUp={this.presButtonBackUp}
presGroupBackUp={this.presGroupBackUp}
removeDocByRef={this.removeDocByRef}
+ clearElemMap={() => this.presElementsMappings.clear()}
/>
</div>
);