From cd15824429fbac94c8342af15acb7ec472506715 Mon Sep 17 00:00:00 2001 From: madelinegr Date: Fri, 7 Jun 2019 17:37:25 -0400 Subject: Fade After Presented Done --- src/client/views/presentationview/PresentationView.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/client/views/presentationview/PresentationView.tsx') diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx index e996765f0..efc333ee3 100644 --- a/src/client/views/presentationview/PresentationView.tsx +++ b/src/client/views/presentationview/PresentationView.tsx @@ -190,6 +190,11 @@ export class PresentationView extends React.Component { key.opacity = 0; } } + if (selectedButtons[buttonIndex.FadeAfter]) { + if (this.childrenDocs.indexOf(key) < index) { + key.opacity = 0.5; + } + } }); } @@ -197,12 +202,20 @@ export class PresentationView extends React.Component { this.presElementsMappings.forEach((presElem: PresentationElement, key: Doc) => { let selectedButtons: boolean[] = presElem.selected; if (selectedButtons[buttonIndex.HideAfter]) { - if (this.childrenDocs.indexOf(key) <= index) { + if (this.childrenDocs.indexOf(key) >= index) { + console.log("CAlled this right"); + key.opacity = 1; + } + } + if (selectedButtons[buttonIndex.FadeAfter]) { + if (this.childrenDocs.indexOf(key) >= index) { key.opacity = 1; } } if (selectedButtons[buttonIndex.HideTillPressed]) { if (this.childrenDocs.indexOf(key) > index) { + console.log("KeyIndex: ", this.childrenDocs.indexOf(key)); + console.log("Cur index: ", index); key.opacity = 0; } } -- cgit v1.2.3-70-g09d2