diff options
| author | bob <bcz@cs.brown.edu> | 2019-08-01 15:05:38 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-08-01 15:05:38 -0400 |
| commit | ff5fbd1206a065eabab917def7d83337a0442cab (patch) | |
| tree | 07c2f86558f9255b9e5a69e032287b8d0539dbd5 /src/client/views/presentationview/PresentationView.tsx | |
| parent | 49faa4e76f91fed04bb1923d81dd23d57a157a63 (diff) | |
| parent | 6f3d4a7015e15e0523fc194f7f911f6d45259165 (diff) | |
Merge branch 'master' into grouping
Diffstat (limited to 'src/client/views/presentationview/PresentationView.tsx')
| -rw-r--r-- | src/client/views/presentationview/PresentationView.tsx | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx index 4fe9d3a1b..bea70f00b 100644 --- a/src/client/views/presentationview/PresentationView.tsx +++ b/src/client/views/presentationview/PresentationView.tsx @@ -375,7 +375,7 @@ export class PresentationView extends React.Component<PresViewProps> { //awaiting jump so that new scale can be found, since jumping is async await DocumentManager.Instance.jumpToDocument(curDoc, true); } else { - await DocumentManager.Instance.jumpToDocument(curDoc, false, undefined, doc => CollectionDockingView.Instance.AddTab(undefined, doc, undefined)); + await DocumentManager.Instance.jumpToDocument(curDoc, true, undefined, doc => CollectionDockingView.Instance.AddTab(undefined, doc, undefined)); } let newScale = DocumentManager.Instance.getScaleOfDocView(curDoc); @@ -881,24 +881,15 @@ export class PresentationView extends React.Component<PresViewProps> { if (presWidth - presMinWidth !== 0) { this.curPresentation.width = 0; } + if (presWidth === 0) { + this.curPresentation.width = presMinWidth; + } } document.removeEventListener("pointermove", this.onPointerMove); document.removeEventListener("pointerup", this.onPointerUp); } /** - * This function gets triggered on click of the dragger. It opens up the - * presentation view, if it was closed beforehand. - */ - togglePresView = (e: React.MouseEvent) => { - e.stopPropagation(); - e.preventDefault(); - let width = NumCast(this.curPresentation.width); - if (width === 0) { - this.curPresentation.width = presMinWidth; - } - } - /** * This function is a setter that opens up the * presentation mode, by setting it's render flag * to true. It also closes the presentation view. @@ -992,7 +983,7 @@ export class PresentationView extends React.Component<PresViewProps> { </div> <div className="mainView-libraryHandle" style={{ cursor: "ew-resize", right: `${width - 10}px`, backgroundColor: "white", opacity: this.opacity, transition: "0.7s opacity ease" }} - onPointerDown={this.onPointerDown} onClick={this.togglePresView}> + onPointerDown={this.onPointerDown}> <span title="library View Dragger" style={{ width: "100%", height: "100%", position: "absolute" }} /> </div> {this.renderPresMode()} |
