From 0bd77219c2f470f5b2a8680cf9712f5947f22bd1 Mon Sep 17 00:00:00 2001
From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>
Date: Thu, 6 Aug 2020 15:13:43 +0800
Subject: pin with view button UI and other small changes
---
src/client/views/PropertiesButtons.tsx | 46 ++++++++++++++++------------------
src/client/views/nodes/PresBox.scss | 10 +++++---
src/client/views/nodes/PresBox.tsx | 7 +++---
3 files changed, 33 insertions(+), 30 deletions(-)
(limited to 'src')
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 642476bc3..002abc5a3 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -237,36 +237,34 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed
get pinWithViewButton() {
const targetDoc = this.selectedDoc;
- const isPinned = targetDoc && Doc.isDocPinned(targetDoc);
if (targetDoc) {
const x = targetDoc._panX;
const y = targetDoc._panY;
const scale = targetDoc._viewScale;
}
return !targetDoc ? (null) : {"Pin with this view"}
>}>
- {
- if (targetDoc) {
- DockedFrameRenderer.PinDoc(targetDoc, false);
- const activeDoc = PresBox.Instance.childDocs[PresBox.Instance.childDocs.length - 1];
- const x = targetDoc._panX;
- const y = targetDoc._panY;
- const scale = targetDoc._viewScale;
- activeDoc.presPinView = true;
- activeDoc.presPinViewX = x;
- activeDoc.presPinViewY = y;
- activeDoc.presPinViewScale = scale;
- }
- }}>
-
-
V
-
{"Pin with view"}
-
;
+ <>
+
{
+ if (targetDoc) {
+ DockedFrameRenderer.PinDoc(targetDoc, false);
+ const activeDoc = PresBox.Instance.childDocs[PresBox.Instance.childDocs.length - 1];
+ const x = targetDoc._panX;
+ const y = targetDoc._panY;
+ const scale = targetDoc._viewScale;
+ activeDoc.presPinView = true;
+ activeDoc.presPinViewX = x;
+ activeDoc.presPinViewY = y;
+ activeDoc.presPinViewScale = scale;
+ }
+ }}>
+
+
V
+
+ {"View"}
+ >
+ ;
}
diff --git a/src/client/views/nodes/PresBox.scss b/src/client/views/nodes/PresBox.scss
index 16821f5bc..8ce71935c 100644
--- a/src/client/views/nodes/PresBox.scss
+++ b/src/client/views/nodes/PresBox.scss
@@ -30,7 +30,7 @@
transform: translate(8px, -5px);
box-shadow: 1px 1px 4px 4px rgba(0, 0, 0, 0.25);
z-index: 1000;
- width: 315;
+ width: calc(100% - 50px);
height: max-content;
justify-self: center;
letter-spacing: normal;
@@ -583,6 +583,8 @@
align-items: center;
justify-content: center;
border-radius: 4px;
+ padding-left: 7px;
+ padding-right: 7px;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
@@ -597,6 +599,8 @@
align-items: center;
justify-content: center;
border-radius: 4px;
+ padding-left: 7px;
+ padding-right: 7px;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
@@ -722,6 +726,7 @@
position: relative;
width: 100%;
background: gray;
+ min-height: 35px;
padding-top: 5px;
padding-bottom: 5px;
display: grid;
@@ -782,8 +787,7 @@
.presBox-button.present {
display: flex;
- min-width: 100px;
- width: 100px;
+ width: max-content;
position: absolute;
right: 10px;
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index ccf1fb8e3..c3b920b26 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -1064,10 +1064,10 @@ export class PresBox extends ViewBoxBaseComponent
Viewfinder
{/* Snapshot
*/}
-
+ {/*
Text progressivize
Edit
-
+
*/}
Scroll progressivize
Edit
@@ -1657,6 +1657,7 @@ export class PresBox extends ViewBoxBaseComponent
return
- this.layoutDoc.presStatus = "manual"}> Present
+ this.layoutDoc.presStatus = "manual"}>
200 ? "inline-flex" : "none" }}> Present
{ e.stopPropagation; this.togglePresent(); }}>
{this.presentDropdown}
--
cgit v1.2.3-70-g09d2