diff options
author | Stanley Yip <33562077+yipstanley@users.noreply.github.com> | 2019-07-30 19:26:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-30 19:26:44 -0400 |
commit | ddeeead1fff76523a2bf32da9ecfa5348fa5b28a (patch) | |
tree | 46ffbb943949d211d81350caa94d712812af3d53 | |
parent | 3549b22f40183bb9fbb715a187229ea0e8575718 (diff) | |
parent | 8db8c9313ae6ff517568444a4ecb0f708b0d07e2 (diff) |
Merge pull request #237 from browngraphicslab/presentation-preview-mohammad
Toggle fix and styling
-rw-r--r-- | src/client/views/presentationview/PresentationView.scss | 11 | ||||
-rw-r--r-- | src/client/views/presentationview/PresentationView.tsx | 17 |
2 files changed, 11 insertions, 17 deletions
diff --git a/src/client/views/presentationview/PresentationView.scss b/src/client/views/presentationview/PresentationView.scss index 97cbd4a24..65b09c833 100644 --- a/src/client/views/presentationview/PresentationView.scss +++ b/src/client/views/presentationview/PresentationView.scss @@ -6,6 +6,8 @@ right: 0; top: 0; bottom: 0; + letter-spacing: 2px; + } .presentationView-item { @@ -19,13 +21,11 @@ -ms-user-select: none; user-select: none; transition: all .1s; - //max-height: 250px; .documentView-node { - // height: auto !important; - // width: aut !important; + position: absolute; z-index: 1; } @@ -52,10 +52,11 @@ .presentationView-selected { background: gray; + color: black; } .presentationView-heading { - background: lightseagreen; + background: gray; padding: 10px; display: inline-block; width: 100%; @@ -67,6 +68,8 @@ font-size: 25px; display: inline-block; width: calc(100% - 200px); + letter-spacing: 2px; + } .presentation-icon { diff --git a/src/client/views/presentationview/PresentationView.tsx b/src/client/views/presentationview/PresentationView.tsx index 4fe9d3a1b..c0251f20b 100644 --- a/src/client/views/presentationview/PresentationView.tsx +++ b/src/client/views/presentationview/PresentationView.tsx @@ -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()} |