aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-02-09 00:03:40 -0500
committermehekj <mehek.jethani@gmail.com>2023-02-09 00:03:40 -0500
commit739fee917e4aa15ff7aef659cc84bfbd3cb48bcf (patch)
tree96babde1ca9ae32379fabcb29f38360701b42c87 /src/client/views/nodes/trails
parentca3868b494bfd00c0349424f622bb5010b0e1197 (diff)
parenta8b19694ec902d4094914ba6ddd15e700fab117e (diff)
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/nodes/trails')
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index ff05dcdcb..427911bd3 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -687,7 +687,9 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
* directly at start.
* @param startIndex: index that the presentation will start at
*/
+ @action
startPresentation = (startIndex: number) => {
+ PresBox.Instance = this;
clearTimeout(this._presTimer);
if (this.childDocs.length) {
this.layoutDoc.presStatus = PresStatus.Autoplay;
@@ -2048,7 +2050,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
</div>
<Tooltip title={<div className="dash-tooltip">{this.layoutDoc.presStatus === PresStatus.Autoplay ? 'Pause' : 'Autoplay'}</div>}>
<div className="presPanel-button" onPointerDown={e => setupMoveUpEvents(this, e, returnFalse, emptyFunction, () => this.startOrPause(true), false, false)}>
- <FontAwesomeIcon icon={this.layoutDoc.presStatus === PresStatus.Autoplay ? 'pause' : 'play'} />
+ <FontAwesomeIcon color={this.layoutDoc.presStatus === PresStatus.Autoplay ? 'red' : undefined} icon={this.layoutDoc.presStatus === PresStatus.Autoplay ? 'pause' : 'play'} />
</div>
</Tooltip>
<div
@@ -2122,7 +2124,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
@action
startOrPause = (makeActive = true) => {
makeActive && this.updateCurrentPresentation();
- if (this.layoutDoc.presStatus === PresStatus.Manual || this.layoutDoc.presStatus === PresStatus.Edit) this.startPresentation(this.itemIndex);
+ if (!this.layoutDoc.presStatus || this.layoutDoc.presStatus === PresStatus.Manual || this.layoutDoc.presStatus === PresStatus.Edit) this.startPresentation(this.itemIndex);
else this.pauseAutoPres();
};