From ac177d7b9a01075fbf1ad1c327c7625d95569afb Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Sun, 2 Aug 2020 18:20:59 -0500 Subject: bug fixes found with sally --- src/client/views/nodes/DocumentView.tsx | 8 ++++---- src/client/views/nodes/FontIconBox.scss | 2 +- src/client/views/nodes/FontIconBox.tsx | 23 +++++++++++++---------- src/client/views/nodes/LabelBox.tsx | 2 +- 4 files changed, 19 insertions(+), 16 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 30382a4ef..ec0a5f3ac 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -677,10 +677,10 @@ export class DocumentView extends DocComponent(Docu @action onCopy = () => { - const copy = Doc.MakeCopy(this.props.Document, true); - copy.x = NumCast(this.props.Document.x) + NumCast(this.props.Document._width); - copy.y = NumCast(this.props.Document.y) + 30; - this.props.addDocument?.(copy); + const alias = Doc.MakeAlias(this.props.Document); + alias.x = NumCast(this.props.Document.x) + NumCast(this.props.Document._width); + alias.y = NumCast(this.props.Document.y) + 30; + this.props.addDocument?.(alias); } @action diff --git a/src/client/views/nodes/FontIconBox.scss b/src/client/views/nodes/FontIconBox.scss index 13af511a6..a142d873a 100644 --- a/src/client/views/nodes/FontIconBox.scss +++ b/src/client/views/nodes/FontIconBox.scss @@ -33,7 +33,7 @@ padding-left: 5px; width: 100%; width: 60px; - height: 70px; + height: 60px; padding-top: 3px; padding-bottom: 3px; diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx index 720d6a15d..7c538df92 100644 --- a/src/client/views/nodes/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox.tsx @@ -66,18 +66,21 @@ export class FontIconBox extends DocComponent( if (this.layoutDoc.menuIcon) { - let backgroundColor = "black"; - if (this.dataDoc.title === "Sharing" || this.dataDoc.title === "Help" || this.dataDoc.title === "Settings" || this.dataDoc.title === "Import") { - backgroundColor = "black"; - } else { - backgroundColor = CurrentUserUtils.selectedPanel === this.dataDoc.title ? "lightgrey" : "black"; - } + // let backgroundColor = "black"; + // if (this.dataDoc.title === "Sharing" || this.dataDoc.title === "Help" || this.dataDoc.title === "Settings" || this.dataDoc.title === "Import") { + // backgroundColor = "black"; + // } else { + // backgroundColor = CurrentUserUtils.selectedPanel === this.dataDoc.title ? "lightgrey" : ""; + // } - const color = backgroundColor === "lightgrey" ? "black" : "white"; - const menuBTN =
+ const color = CurrentUserUtils.selectedPanel === this.dataDoc.title ? "black" : "white"; + const menuBTN =
-
- +
+
{this.dataDoc.title}
; diff --git a/src/client/views/nodes/LabelBox.tsx b/src/client/views/nodes/LabelBox.tsx index 0dfbdc5cf..05ba6628c 100644 --- a/src/client/views/nodes/LabelBox.tsx +++ b/src/client/views/nodes/LabelBox.tsx @@ -41,7 +41,7 @@ export class LabelBox extends ViewBoxBaseComponent