From 3058388e7d377d874f4460e9fba3f1ba51127cb0 Mon Sep 17 00:00:00 2001 From: geireann <60007097+geireann@users.noreply.github.com> Date: Mon, 24 Aug 2020 22:14:42 +0800 Subject: small change with transition change bug fix --- src/client/views/nodes/PresBox.tsx | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 86edfd994..050ecfc49 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -156,7 +156,6 @@ export class PresBox extends ViewBoxBaseComponent this._moveOnFromAudio = true; } else this._moveOnFromAudio = false; } else if (this.childDocs[this.itemIndex + 1] === undefined && this.layoutDoc.presLoop) { - console.log('loop'); const nextSelected = 0; this.gotoDocument(0, this.itemIndex); } @@ -479,10 +478,8 @@ export class PresBox extends ViewBoxBaseComponent */ @undoBatch updateMovement = action((movement: any, activeItem: Doc, targetDoc: Doc) => { - console.log(movement); switch (movement) { case 'zoom': //Pan and zoom - console.log('zoom'); activeItem.presNavButton = false; activeItem.presZoomButton = !activeItem.presZoomButton; targetDoc.presTransition = activeItem.presTransition; @@ -513,14 +510,14 @@ export class PresBox extends ViewBoxBaseComponent } }); - setMovementName = action((movement: any): string => { + setMovementName = action((movement: any, activeItem: Doc): string => { let output: string = 'none'; - console.log(movement); switch (movement) { case 'zoom': output = 'Zoom'; break; //Pan and zoom case 'pan': output = 'Pan'; break; //Pan case 'jump': output = 'Jump cut'; break; //Jump Cut - case 'none': default: output = 'None'; break; //None + case 'none': output = 'None'; break; //None + default: output = 'Zoom'; activeItem.presMovement = 'zoom'; break; //default set as zoom } return output; }); @@ -804,7 +801,7 @@ export class PresBox extends ViewBoxBaseComponent
Movement
{ e.stopPropagation(); this.openMovementDropdown = !this.openMovementDropdown; })} style={{ borderBottomLeftRadius: this.openMovementDropdown ? 0 : 5, border: this.openMovementDropdown ? 'solid 2px #5B9FDD' : 'solid 1px black' }}> - {this.setMovementName(activeItem.presMovement)} + {this.setMovementName(activeItem.presMovement, activeItem)}
e.stopPropagation()} style={{ display: this.openMovementDropdown ? "grid" : "none" }}>
e.stopPropagation()} onClick={() => this.updateMovement('none', activeItem, targetDoc)}>None
@@ -1262,7 +1259,7 @@ export class PresBox extends ViewBoxBaseComponent
Active text color
-
{ console.log("hi"); this.openActiveColorPicker = !this.openActiveColorPicker; })}> +
{ this.openActiveColorPicker = !this.openActiveColorPicker; })}>
{this.activeColorPicker} @@ -1674,10 +1671,7 @@ export class PresBox extends ViewBoxBaseComponent
{"Loop"}
}>
this.layoutDoc.presLoop = !this.layoutDoc.presLoop}>
-
{this.layoutDoc.presStatus === "auto" ? "Pause" : "Autoplay"}
}>
{ - if (this.layoutDoc.presStatus === "manual") this.startAutoPres(this.itemIndex); - else this.pauseAutoPres(); - }}>
+
{this.layoutDoc.presStatus === "auto" ? "Pause" : "Autoplay"}
}>
250 ? "inline-flex" : "none" }}> @@ -1692,6 +1686,12 @@ export class PresBox extends ViewBoxBaseComponent
); } + @action + startOrPause = () => { + if (this.layoutDoc.presStatus === "manual") this.startAutoPres(this.itemIndex); + else this.pauseAutoPres(); + } + render() { // calling this method for keyEvents this.isPres; @@ -1704,10 +1704,7 @@ export class PresBox extends ViewBoxBaseComponent
{"Loop"}
}>
this.layoutDoc.presLoop = !this.layoutDoc.presLoop}>
-
{this.layoutDoc.presStatus === "auto" ? "Pause" : "Autoplay"}
}>
{ - if (this.layoutDoc.presStatus === "manual") this.startAutoPres(this.itemIndex); - else this.pauseAutoPres(); - }}>
+
{this.layoutDoc.presStatus === "auto" ? "Pause" : "Autoplay"}
}>
-- cgit v1.2.3-70-g09d2