From 45dc37a7eb8f2ed3c94e8300bdbacf07122754e6 Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Thu, 22 Oct 2020 00:29:03 +0800 Subject: minor undoBatch changes --- src/client/views/collections/CollectionStackingView.tsx | 1 + src/client/views/nodes/PresBox.tsx | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index d490b65a8..1ed7652e0 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -294,6 +294,7 @@ export class CollectionStackingView extends CollectionSubView this.filteredChildren.find((fdoc, i) => ndoc === fdoc && i <= insertInd) ? off + 1 : off, 0); newDocs.filter(ndoc => docs.indexOf(ndoc) !== -1).forEach(ndoc => docs.splice(docs.indexOf(ndoc), 1)); diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 53b2433e8..eabd57632 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -516,7 +516,6 @@ export class PresBox extends ViewBoxBaseComponent /** * The method called to open the presentation as a minimized view */ - @undoBatch @action updateMinimize = () => { const docView = DocumentManager.Instance.getDocumentView(this.layoutDoc); @@ -552,7 +551,7 @@ export class PresBox extends ViewBoxBaseComponent * Called when the user changes the view type * Either 'List' (stacking) or 'Slides' (carousel) */ - @undoBatch + // @undoBatch viewChanged = action((e: React.ChangeEvent) => { //@ts-ignore const viewType = e.target.selectedOptions[0].value as CollectionViewType; @@ -871,7 +870,6 @@ export class PresBox extends ViewBoxBaseComponent // } // Converts seconds to ms and updates presTransition - @undoBatch setTransitionTime = (number: String, change?: number) => { let timeInMS = Number(number) * 1000; if (change) timeInMS += change; @@ -883,7 +881,6 @@ export class PresBox extends ViewBoxBaseComponent } // Converts seconds to ms and updates presDuration - @undoBatch setDurationTime = (number: String, change?: number) => { let timeInMS = Number(number) * 1000; if (change) timeInMS += change; @@ -1000,10 +997,10 @@ export class PresBox extends ViewBoxBaseComponent onChange={action((e) => this.setTransitionTime(e.target.value))} /> s
-
this.setTransitionTime(String(transitionSpeed), 1000)}> +
this.setTransitionTime(String(transitionSpeed), 1000))}>
-
this.setTransitionTime(String(transitionSpeed), -1000)}> +
this.setTransitionTime(String(transitionSpeed), -1000))}>
@@ -1031,10 +1028,10 @@ export class PresBox extends ViewBoxBaseComponent onChange={action((e) => this.setDurationTime(e.target.value))} /> s
-
this.setDurationTime(String(duration), 1000)}> +
this.setDurationTime(String(duration), 1000))}>
-
this.setDurationTime(String(duration), -1000)}> +
this.setDurationTime(String(duration), -1000))}>
-- cgit v1.2.3-70-g09d2