From 3f22b29081c2addfdbcd58e9fb9f7acdbb0cd729 Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Thu, 15 Oct 2020 19:03:19 +0800 Subject: Carousel -> 3D Carousel --- src/client/views/DocumentButtonBar.tsx | 5 +++-- src/client/views/PropertiesView.tsx | 4 ++-- src/client/views/nodes/PresBox.tsx | 13 ++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index d8c32a919..9dddb4c44 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -25,6 +25,7 @@ import { GoogleRef } from "./nodes/formattedText/FormattedTextBox"; import { TemplateMenu } from "./TemplateMenu"; import React = require("react"); import { PresBox } from './nodes/PresBox'; +import { undoBatch } from '../util/UndoManager'; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -199,7 +200,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV const targetDoc = this.view0?.props.Document; return !targetDoc ? (null) :
{"Pin with current view"}
}>
{ + onClick={undoBatch(e => { if (targetDoc) { TabDocView.PinDoc(targetDoc, false); const activeDoc = PresBox.Instance.childDocs[PresBox.Instance.childDocs.length - 1]; @@ -211,7 +212,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV activeDoc.presPinViewY = y; activeDoc.presPinViewScale = scale; } - }}> + })}> {presPinWithViewIcon}
; diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index a64004c5c..6bdb6e21f 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1040,7 +1040,7 @@ export class PropertiesView extends React.Component { {PresBox.Instance.optionsDropdown} : null} } -
+ {/*
{ this.openAddSlide = !this.openAddSlide; })} style={{ backgroundColor: this.openAddSlide ? "black" : "" }}> @@ -1052,7 +1052,7 @@ export class PropertiesView extends React.Component { {this.openAddSlide ?
{PresBox.Instance.newDocumentDropdown}
: null} -
+
*/}
; } } diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 36705ecba..5c6f7095a 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -299,7 +299,7 @@ export class PresBox extends ViewBoxBaseComponent // if targetDoc is not displayed but one of its aliases is, then we need to modify that alias, not the original target const bestTarget = DocumentManager.Instance.getFirstDocumentView(targetDoc)?.props.Document; bestTarget && runInAction(() => { - if (bestTarget.type === DocumentType.PDF) { + if (bestTarget.type === DocumentType.PDF || bestTarget.type === DocumentType.WEB || bestTarget.type === DocumentType.RTF || bestTarget._viewType === CollectionViewType.Stacking) { bestTarget._scrollY = activeItem.presPinViewScroll; } else { bestTarget._viewTransition = activeItem.presTransition ? `transform ${activeItem.presTransition}ms` : 'all 0.5s'; @@ -485,7 +485,6 @@ export class PresBox extends ViewBoxBaseComponent /** * The method called to open the presentation as a minimized view - * TODO: Look at old updateMinimize and compare... */ @undoBatch @action @@ -1664,16 +1663,16 @@ export class PresBox extends ViewBoxBaseComponent const propTitle = CurrentUserUtils.propertiesWidth > 0 ? "Close Presentation Panel" : "Open Presentation Panel"; return (
-
{"Add new slide"}
}>
this.newDocumentTools = !this.newDocumentTools)}> + {/*
{"Add new slide"}
}>
this.newDocumentTools = !this.newDocumentTools)}> -
-
+
*/}
{"View paths"}
}>
1 ? 1 : 0.3 }} className={`toolbar-button ${this.pathBoolean ? "active" : ""}`} onClick={this.childDocs.length > 1 ? this.viewPaths : undefined}>
+
{this.rootDoc.expandBoolean ? "Minimize all" : "Expand all"}
}>
{/* */} @@ -1705,7 +1704,7 @@ export class PresBox extends ViewBoxBaseComponent onChange={this.viewChanged} value={mode}> - +
0 ? 1 : 0.3 }}> @@ -1853,7 +1852,7 @@ export class PresBox extends ViewBoxBaseComponent {this.playButtonFrames}
-
{ this.updateMinimize; this.layoutDoc.presStatus = "edit"; clearTimeout(this._presTimer); }}>EXIT
+
{ this.updateMinimize(); this.layoutDoc.presStatus = "edit"; clearTimeout(this._presTimer); }}>EXIT
: -- cgit v1.2.3-70-g09d2