From 988a16c4b69d1d5062bccf70295aa90c490f9e76 Mon Sep 17 00:00:00 2001
From: usodhi <61431818+usodhi@users.noreply.github.com>
Date: Thu, 6 Aug 2020 17:18:34 +0530
Subject: a bunch of commented stuff in propertiesview that is to be used for
adding in the sharing panel customisation buttons
---
.../collectionFreeForm/PropertiesView.scss | 27 ++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
(limited to 'src/client/views/collections/collectionFreeForm/PropertiesView.scss')
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.scss b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
index 7df56115f..7b5d611f3 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.scss
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
@@ -119,6 +119,19 @@
font-size: 10px;
padding: 10px;
margin-left: 5px;
+
+ .change-buttons {
+ display: flex;
+
+ button {
+ width: 5;
+ height: 5;
+ }
+
+ input {
+ width: 100%;
+ }
+ }
}
}
@@ -233,11 +246,15 @@
.propertiesView-sharingTable {
+ // whatever's commented out - add it back in when adding the buttons
+
+ // border: 1.5px solid black;
border: 1px solid black;
- padding: 5px;
- border-radius: 6px;
- /* width: 170px; */
- margin-right: 10px;
+ padding: 5px; // remove when adding buttons
+ border-radius: 6px; // remove when adding buttons
+ margin-right: 10px; // remove when adding buttons
+ // width: 100%;
+ // display: inline-table;
background-color: #ececec;
max-height: 130px;
overflow-y: scroll;
@@ -245,9 +262,11 @@
.propertiesView-sharingTable-item {
display: flex;
+ // padding: 5px;
padding: 3px;
align-items: center;
border-bottom: 0.5px solid grey;
+ cursor: pointer;
&:hover .propertiesView-sharingTable-item-name {
overflow-x: unset;
--
cgit v1.2.3-70-g09d2
From 33487aa34fd455acf5216cfee7913d6e36f390ed Mon Sep 17 00:00:00 2001
From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>
Date: Fri, 7 Aug 2020 01:35:46 +0800
Subject: presentaiton options slightly reformatted :pear:
---
src/client/views/PropertiesButtons.tsx | 3 +-
.../views/collections/CollectionDockingView.tsx | 3 +-
.../collectionFreeForm/PropertiesView.scss | 37 +++++++++
.../collectionFreeForm/PropertiesView.tsx | 64 ++++++++--------
src/client/views/nodes/PresBox.scss | 8 +-
src/client/views/nodes/PresBox.tsx | 89 ++++++++++------------
.../views/nodes/formattedText/FormattedTextBox.tsx | 19 ++---
.../views/presentationview/PresElementBox.scss | 4 +-
.../views/presentationview/PresElementBox.tsx | 3 +-
9 files changed, 128 insertions(+), 102 deletions(-)
(limited to 'src/client/views/collections/collectionFreeForm/PropertiesView.scss')
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index 55eb6c028..5c584d270 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -221,8 +221,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
DockedFrameRenderer.PinDoc(targetDoc, isPinned)}>
-
+
{
return (
document.addEventListener("keydown", PresBox.Instance.minimizeEvents, false)}
>
- {
document.addEventListener("keydown", PresBox.Instance.minimizeEvents, false)}>
+ {
PresBox.Instance.startAutoPres(PresBox.Instance.itemIndex)}>
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.scss b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
index 5b41db90e..3ae94efb7 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.scss
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
@@ -405,6 +405,43 @@
}
}
+
+ .propertiesView-presTrails {
+ border-bottom: 1px solid black;
+ //padding: 8.5px;
+
+ .propertiesView-presTrails-title {
+ font-weight: bold;
+ font-size: 12.5px;
+ padding: 4px;
+ display: flex;
+ color: white;
+ padding-left: 8px;
+ background-color: rgb(51, 51, 51);
+
+ &:hover {
+ cursor: pointer;
+ }
+
+ .propertiesView-presTrails-title-icon {
+ float: right;
+ right: 0;
+ position: absolute;
+ margin-left: 2px;
+ margin-right: 9px;
+
+ &:hover {
+ cursor: pointer;
+ }
+ }
+ }
+
+ .propertiesView-presTrails-content {
+ font-size: 10px;
+ padding: 10px;
+ margin-left: 5px;
+ }
+ }
}
.inking-button {
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
index 89f48fc65..cef2241c9 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
@@ -71,11 +71,10 @@ export class PropertiesView extends React.Component
{
@observable openAppearance: boolean = true;
@observable openTransform: boolean = true;
//Pres Trails booleans:
- @observable openAddSlide: boolean = true;
- @observable openPresentationTools: boolean = true;
- @observable openPresTransitions: boolean = true;
- @observable openPresProgressivize: boolean = true;
- @observable openSlideOptions: boolean = true;
+ @observable openPresTransitions: boolean = false;
+ @observable openPresProgressivize: boolean = false;
+ @observable openAddSlide: boolean = false;
+ @observable openSlideOptions: boolean = false;
@observable inActions: boolean = false;
@observable _controlBtn: boolean = false;
@@ -874,6 +873,7 @@ export class PropertiesView extends React.Component {
;
}
if (this.isPres) {
+ const selectedItem: boolean = PresBox.Instance._selectedArray.length > 0;
return
Presentation
@@ -890,57 +890,57 @@ export class PropertiesView extends React.Component
{
-
-
runInAction(() => { this.openAddSlide = !this.openAddSlide; })}
- style={{ backgroundColor: this.openAddSlide ? "black" : "" }}>
-
Add new slide
-
-
-
-
- {this.openAddSlide ?
- {PresBox.Instance.newDocumentDropdown}
-
: null}
-
-
-
+
runInAction(() => { this.openPresTransitions = !this.openPresTransitions; })}
style={{ backgroundColor: this.openPresTransitions ? "black" : "" }}>
Transitions
-
- {this.openPresTransitions ?
+ {this.openPresTransitions ?
{PresBox.Instance.transitionDropdown}
: null}
-
-
-
}
+ {!selectedItem ? (null) :
+
runInAction(() => { this.openPresProgressivize = !this.openPresProgressivize; })}
style={{ backgroundColor: this.openPresProgressivize ? "black" : "" }}>
Progressivize
-
- {this.openPresProgressivize ?
+ {this.openPresProgressivize ?
{PresBox.Instance.progressivizeDropdown}
: null}
-
-
-
}
+ {!selectedItem ? (null) :
+
runInAction(() => { this.openSlideOptions = !this.openSlideOptions; })}
style={{ backgroundColor: this.openSlideOptions ? "black" : "" }}>
{PresBox.Instance.stringType} options
-
- {this.openSlideOptions ?
+ {this.openSlideOptions ?
{PresBox.Instance.optionsDropdown}
: null}
+
}
+
+
runInAction(() => { this.openAddSlide = !this.openAddSlide; })}
+ style={{ backgroundColor: this.openAddSlide ? "black" : "" }}>
+
Add new slide
+
+
+
+
+ {this.openAddSlide ?
+ {PresBox.Instance.newDocumentDropdown}
+
: null}
if (srcContext.miniPres) {
srcContext.miniPres = false;
CollectionDockingView.AddRightSplit(this.rootDoc);
- document.removeEventListener("keydown", this.minimizeEvents, false);
} else {
srcContext.miniPres = true;
this.props.addDocTab?.(this.rootDoc, "close");
- document.addEventListener("keydown", this.minimizeEvents, false);
}
}
}
@@ -506,20 +504,6 @@ export class PresBox extends ViewBoxBaseComponent
}
}
- // Key events when the minimized player is active
- @action
- minimizeEvents = (e: KeyboardEvent) => {
- e.stopPropagation();
- e.preventDefault();
- if (e.keyCode === 27) { // Escape key
- this.layoutDoc.presStatus = "edit";
- } if (e.keyCode === 37) { // left(37) / a(65) / up(38) to go back
- this.back();
- } if (e.keyCode === 39) { // right (39) / d(68) / down(40) to go to next
- this.next();
- }
- }
-
// Key for when the presentaiton is active (according to Selection Manager)
@action
keyEvents = (e: KeyboardEvent) => {
@@ -531,10 +515,10 @@ export class PresBox extends ViewBoxBaseComponent
else this.layoutDoc.presStatus = "edit";
} if ((e.metaKey || e.altKey) && e.keyCode === 65) { // Ctrl-A to select all
if (this.layoutDoc.presStatus === "edit") this._selectedArray = this.childDocs;
- } if (e.keyCode === 37) { // left(37) / a(65) / up(38) to go back
- if (this.layoutDoc.presStatus !== "edit") this.back();
- } if (e.keyCode === 39) { // right (39) / d(68) / down(40) to go to next
- if (this.layoutDoc.presStatus !== "edit") this.next();
+ } if (e.keyCode === 37 || e.keyCode === 38) { // left(37) / a(65) / up(38) to go back
+ this.back();
+ } if (e.keyCode === 39 || e.keyCode === 40) { // right (39) / d(68) / down(40) to go to next
+ this.next();
} if (e.keyCode === 32) { // spacebar to 'present' or autoplay
if (this.layoutDoc.presStatus !== "edit") this.startAutoPres(0);
else this.layoutDoc.presStatus = "manual";
@@ -720,7 +704,7 @@ export class PresBox extends ViewBoxBaseComponent
{duration} s
) => { e.stopPropagation(); this.setDurationTime(e.target.value); }} />
-
+
Short
Medium
Long
@@ -814,6 +798,20 @@ export class PresBox extends ViewBoxBaseComponent
activeItem.openDocument = !activeItem.openDocument}>Open document
+
+
{
+ activeItem.presPinView = !activeItem.presPinView;
+ if (activeItem.presPinView) {
+ const x = targetDoc._panX;
+ const y = targetDoc._panY;
+ const scale = targetDoc._viewScale;
+ activeItem.presPinViewX = x;
+ activeItem.presPinViewY = y;
+ activeItem.presPinViewScale = scale;
+ }
+ }}>Presentation pin view
+
@@ -1592,35 +1590,26 @@ export class PresBox extends ViewBoxBaseComponent
@computed get toolbar() {
const activeItem = Cast(this.childDocs[this.itemIndex], Doc, null);
- if (activeItem) {
- return (
-
- );
- } else {
- return (
-
- );
- }
+ return (
+
+ );
}
/**
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index af4bd77c7..cc37cf586 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -577,7 +577,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
const mainBulletText: string[] = [];
const mainBulletList: Doc[] = [];
if (list) {
- const newBullets: Doc[] = this.recursiveProgressivize(1, list);
+ const newBullets: Doc[] = this.recursiveProgressivize(1, list)[0];
mainBulletList.push.apply(mainBulletList, newBullets);
}
console.log(mainBulletList.length);
@@ -591,7 +591,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
this.props.addDocument?.(doc);
}
- recursiveProgressivize = (nestDepth: number, list: HTMLCollectionOf, d?: number, y?: number, before?: string): Doc[] => {
+ recursiveProgressivize = (nestDepth: number, list: HTMLCollectionOf, d?: number, y?: number, before?: string): [Doc[], number] => {
const mainBulletList: Doc[] = [];
let b = d ? d : 0;
let yLoc = y ? y : 0;
@@ -607,29 +607,30 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
if (listItem.childElementCount > 1) {
b++;
nestCount++;
- count = before ? count + nestCount + "." : nestCount + ".";
yLoc += height;
+ count = before ? count + nestCount + "." : nestCount + ".";
const text = listItem.getElementsByTagName("p")[0].innerText;
const length = text.length;
- const bullet1 = Docs.Create.TextDocument(count + " " + text, { title: "Slide text", _width: width, _height: height, x: xLoc, y: 10 + (yLoc), _fontSize: fontSize, backgroundColor: "rgba(0,0,0,0)", appearFrame: d ? d : b });
+ const bullet1 = Docs.Create.TextDocument(count + " " + text, { title: "Slide text", _width: width, _autoHeight: true, x: xLoc, y: (yLoc), _fontSize: fontSize, backgroundColor: "rgba(0,0,0,0)", appearFrame: d ? d : b });
+ // yLoc += NumCast(bullet1._height);
mainBulletList.push(bullet1);
const newList = this.recursiveProgressivize(nestDepth + 1, listItem.getElementsByTagName("li"), b, yLoc, count);
- mainBulletList.push.apply(mainBulletList, newList);
- b += newList.length;
+ mainBulletList.push.apply(mainBulletList, newList[0]);
yLoc += newList.length * (55 - ((nestDepth + 1) * 5));
} else {
b++;
nestCount++;
- count = before ? count + nestCount + "." : nestCount + ".";
yLoc += height;
+ count = before ? count + nestCount + "." : nestCount + ".";
const text = listItem.innerText;
const length = text.length;
- const bullet1 = Docs.Create.TextDocument(count + " " + text, { title: "Slide text", _width: width, _height: height, x: xLoc, y: 10 + (yLoc), _fontSize: fontSize, backgroundColor: "rgba(0,0,0,0)", appearFrame: d ? d : b });
+ const bullet1 = Docs.Create.TextDocument(count + " " + text, { title: "Slide text", _width: width, _autoHeight: true, x: xLoc, y: (yLoc), _fontSize: fontSize, backgroundColor: "rgba(0,0,0,0)", appearFrame: d ? d : b });
+ // yLoc += NumCast(bullet1._height);
mainBulletList.push(bullet1);
}
}
});
- return mainBulletList;
+ return [mainBulletList, yLoc];
}
recordDictation = () => {
diff --git a/src/client/views/presentationview/PresElementBox.scss b/src/client/views/presentationview/PresElementBox.scss
index 3d730d7ac..1e776384a 100644
--- a/src/client/views/presentationview/PresElementBox.scss
+++ b/src/client/views/presentationview/PresElementBox.scss
@@ -4,7 +4,7 @@ $light-background: #ececec;
.presElementBox-item {
display: grid;
- grid-template-columns: max-content max-content max-content;
+ grid-template-columns: max-content max-content max-content max-content;
background-color: #d5dce2;
font-family: Roboto;
letter-spacing: normal;
@@ -122,7 +122,7 @@ $light-background: #ececec;
padding-left: 10px;
padding-right: 10px;
letter-spacing: normal;
- max-width: max-content;
+ width: max-content;
text-overflow: ellipsis;
overflow: hidden;
white-space: pre;
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index 816577847..a6dbb76ef 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -326,11 +326,12 @@ export class PresElementBox extends ViewBoxBaseComponent
{`${this.indexInPres + 1}.`}
-
+
{`${this.targetDoc?.title}`}
{"Movement speed"}
>}> 300 ? "block" : "none" }}>{this.transition}
{"Duration"}
>}> 300 ? "block" : "none" }}>{this.duration}
+
{"Presentation pin view"}
>}> 300 ? "block" : "none" }}>V
{"Remove from presentation"}
>}> {
--
cgit v1.2.3-70-g09d2