diff options
| author | madelinegr <mgriswold99@gmail.com> | 2019-06-07 16:43:26 -0400 |
|---|---|---|
| committer | madelinegr <mgriswold99@gmail.com> | 2019-06-07 16:43:26 -0400 |
| commit | 213cd917b20a8955ebfa0a4127e2853614314087 (patch) | |
| tree | f0eb7fa34409c52f5a556e331740ede9f6d327a6 /src/client/views/presentationview/PresentationView.tsx | |
| parent | ecac03b032c4d1484408b892024135a814cd3265 (diff) | |
HideAfter Presented Done
Diffstat (limited to 'src/client/views/presentationview/PresentationView.tsx')
| -rw-r--r-- | src/client/views/presentationview/PresentationView.tsx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx index 4fcc0b523..e996765f0 100644 --- a/src/client/views/presentationview/PresentationView.tsx +++ b/src/client/views/presentationview/PresentationView.tsx @@ -179,17 +179,29 @@ export class PresentationView extends React.Component<PresViewProps> { showAfterPresented = (index: number) => { this.presElementsMappings.forEach((presElem: PresentationElement, key: Doc) => { - if (presElem.selected[buttonIndex.HideTillPressed]) { + let selectedButtons: boolean[] = presElem.selected; + if (selectedButtons[buttonIndex.HideTillPressed]) { if (this.childrenDocs.indexOf(key) <= index) { key.opacity = 1; } } + if (selectedButtons[buttonIndex.HideAfter]) { + if (this.childrenDocs.indexOf(key) < index) { + key.opacity = 0; + } + } }); } hideIfNotPresented = (index: number) => { this.presElementsMappings.forEach((presElem: PresentationElement, key: Doc) => { - if (presElem.selected[buttonIndex.HideTillPressed]) { + let selectedButtons: boolean[] = presElem.selected; + if (selectedButtons[buttonIndex.HideAfter]) { + if (this.childrenDocs.indexOf(key) <= index) { + key.opacity = 1; + } + } + if (selectedButtons[buttonIndex.HideTillPressed]) { if (this.childrenDocs.indexOf(key) > index) { key.opacity = 0; } |
