aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/presentationview/PresentationElement.tsx18
-rw-r--r--src/client/views/presentationview/PresentationView.tsx15
2 files changed, 31 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresentationElement.tsx b/src/client/views/presentationview/PresentationElement.tsx
index bf09efaf2..e821c9478 100644
--- a/src/client/views/presentationview/PresentationElement.tsx
+++ b/src/client/views/presentationview/PresentationElement.tsx
@@ -138,10 +138,26 @@ export default class PresentationElement extends React.Component<PresentationEle
if (this.selectedButtons[buttonIndex.HideAfter]) {
this.selectedButtons[buttonIndex.HideAfter] = false;
} else {
+ if (this.selectedButtons[buttonIndex.FadeAfter]) {
+ this.selectedButtons[buttonIndex.FadeAfter] = false;
+ }
this.selectedButtons[buttonIndex.HideAfter] = true;
}
}
+ @action
+ onFadeDocumentAfterPresentedClick = (e: React.MouseEvent) => {
+ e.stopPropagation();
+ if (this.selectedButtons[buttonIndex.FadeAfter]) {
+ this.selectedButtons[buttonIndex.FadeAfter] = false;
+ } else {
+ if (this.selectedButtons[buttonIndex.HideAfter]) {
+ this.selectedButtons[buttonIndex.HideAfter] = false;
+ }
+ this.selectedButtons[buttonIndex.FadeAfter] = true;
+ }
+ }
+
render() {
let p = this.props;
@@ -174,7 +190,7 @@ export default class PresentationElement extends React.Component<PresentationEle
<button className={this.selectedButtons[buttonIndex.Show] ? "presentation-interaction-selected" : "presentation-interaction"}>A</button>
<button className={this.selectedButtons[buttonIndex.Navigate] ? "presentation-interaction-selected" : "presentation-interaction"}>B</button>
<button className={this.selectedButtons[buttonIndex.HideTillPressed] ? "presentation-interaction-selected" : "presentation-interaction"} onClick={this.onHideDocumentUntilPressClick}>C</button>
- <button className={this.selectedButtons[buttonIndex.FadeAfter] ? "presentation-interaction-selected" : "presentation-interaction"}>D</button>
+ <button className={this.selectedButtons[buttonIndex.FadeAfter] ? "presentation-interaction-selected" : "presentation-interaction"} onClick={this.onFadeDocumentAfterPresentedClick}>D</button>
<button className={this.selectedButtons[buttonIndex.HideAfter] ? "presentation-interaction-selected" : "presentation-interaction"} onClick={this.onHideDocumentAfterPresentedClick}>E</button>
<button className={this.selectedButtons[buttonIndex.Group] ? "presentation-interaction-selected" : "presentation-interaction"} onClick={(e) => {
e.stopPropagation();
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<PresViewProps> {
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<PresViewProps> {
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;
}
}