aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/collectionFreeForm/PropertiesView.scss42
-rw-r--r--src/client/views/collections/collectionFreeForm/PropertiesView.tsx21
-rw-r--r--src/client/views/nodes/PresBox.scss2
-rw-r--r--src/client/views/nodes/PresBox.tsx2
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx2
5 files changed, 39 insertions, 30 deletions
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.scss b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
index 6283a6669..2cdaa25ee 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.scss
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.scss
@@ -543,6 +543,27 @@
}
}
+.propertiesView-presSelected {
+ border-top: solid 1px darkgrey;
+ width: 100%;
+ padding-top: 5px;
+ font-family: Roboto;
+ font-weight: 500;
+ display: inline-flex;
+
+ .propertiesView-selectedList {
+ border-left: solid 1px darkgrey;
+ margin-left: 10px;
+ padding-left: 5px;
+
+ .selectedList-items {
+ font-size: 12;
+ font-weight: 300;
+ margin-top: 1;
+ }
+ }
+}
+
.widthAndDash {
.width {
@@ -617,25 +638,4 @@
margin-top: 2px;
}
}
-
- .propertiesView-presSelected {
- border-top: solid 1px darkgrey;
- width: 100%;
- padding-top: 5px;
- font-family: Roboto;
- font-weight: 500;
- display: inline-flex;
-
- .propertiesView-selectedList {
- border-left: solid 1px darkgrey;
- margin-left: 10px;
- padding-left: 5px;
-
- .selectedList-items {
- font-size: 12;
- font-weight: 300;
- margin-top: 1;
- }
- }
- }
} \ No newline at end of file
diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
index ce8baf559..88d585596 100644
--- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
+++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx
@@ -47,9 +47,14 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get selectedDocumentView() {
if (SelectionManager.SelectedDocuments().length) {
return SelectionManager.SelectedDocuments()[0];
- } else { console.log(undefined); return undefined; }
+ } else if (PresBox.Instance._selectedArray.length >= 1) {
+ return DocumentManager.Instance.getDocumentView(PresBox.Instance.rootDoc);
+ } else { return undefined; }
+ }
+ @computed get isPres(): boolean {
+ if (this.selectedDoc?.type === DocumentType.PRES) return true;
+ return false;
}
- @computed get isPres() { return this.selectedDoc?.type === DocumentType.PRES }
@computed get selectedDoc() { return this.selectedDocumentView?.rootDoc; }
@computed get dataDoc() { return this.selectedDocumentView?.dataDoc; }
@@ -748,10 +753,14 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
render() {
if (!this.selectedDoc) {
- return <div className="propertiesView" style={{ width: this.props.width }}>
- <div className="propertiesView-title" style={{ width: this.props.width, paddingLeft: 6 }}>
- No Document Selected
- </div> </div>;
+ console.log("!selectedDoc")
+ if (this.isPres === false) {
+ console.log("!isPres")
+ return <div className="propertiesView" style={{ width: this.props.width }}>
+ <div className="propertiesView-title" style={{ width: this.props.width, paddingLeft: 6 }}>
+ No Document Selected
+ </div> </div>;
+ }
}
const novice = Doc.UserDoc().noviceMode;
diff --git a/src/client/views/nodes/PresBox.scss b/src/client/views/nodes/PresBox.scss
index e5878708f..83e7152a8 100644
--- a/src/client/views/nodes/PresBox.scss
+++ b/src/client/views/nodes/PresBox.scss
@@ -143,7 +143,7 @@
display: grid;
justify-content: flex-start;
align-items: center;
- grid-template-columns: repeat(auto-fit, 50px);
+ grid-template-columns: repeat(auto-fit, 70px);
}
.ribbon-property {
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index 618161e97..496d4666e 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -832,7 +832,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
</div>
</div>
<div className="presBox-subheading" style={{ display: effect === 'None' ? "none" : "block" }}>Effect direction</div>
- <div className="presBox-reactiveGrid" style={{ display: effect === 'None' ? "none" : "grid", width: 40 }}>
+ <div className="presBox-reactiveGrid" style={{ display: effect === 'None' ? "none" : "grid" }}>
<div className="effectDirection" style={{ display: "grid", width: 40 }}>
<Tooltip title={<><div className="dash-tooltip">{"Enter from left"}</div></>}><div style={{ gridColumn: 1, gridRow: 2, justifySelf: 'center', color: targetDoc.presEffectDirection === "left" ? "#5a9edd" : "black" }} onClick={() => targetDoc.presEffectDirection = 'left'}><FontAwesomeIcon icon={"angle-right"} /></div></Tooltip>
<Tooltip title={<><div className="dash-tooltip">{"Enter from right"}</div></>}><div style={{ gridColumn: 3, gridRow: 2, justifySelf: 'center', color: targetDoc.presEffectDirection === "right" ? "#5a9edd" : "black" }} onClick={() => targetDoc.presEffectDirection = 'right'}><FontAwesomeIcon icon={"angle-left"} /></div></Tooltip>
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index 85949c5a8..ce7a43315 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -278,7 +278,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
} else if (e.shiftKey) {
PresBox.Instance.shiftSelect(this.rootDoc, this._itemRef.current!, this._dragRef.current!);
} else {
- this.props.focus(this.rootDoc);
+ PresBox.Instance.selectElement(this.rootDoc);
PresBox.Instance._eleArray = [];
PresBox.Instance._eleArray.push(this._itemRef.current!);
PresBox.Instance._dragArray = [];