From 48a65994e75fc0f2aaeb96807e8a4f58ff3e3968 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 3 Aug 2020 11:26:17 -0400 Subject: restored button next to tab for dragging document & changed tab view --- .../views/collections/CollectionDockingView.scss | 17 +++++-- .../views/collections/CollectionDockingView.tsx | 4 ++ .../views/collections/ParentDocumentSelector.tsx | 2 +- .../collectionFreeForm/PropertiesView.tsx | 54 +++++++++++----------- 4 files changed, 45 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionDockingView.scss b/src/client/views/collections/CollectionDockingView.scss index 27d66f796..6ebd5103b 100644 --- a/src/client/views/collections/CollectionDockingView.scss +++ b/src/client/views/collections/CollectionDockingView.scss @@ -52,6 +52,20 @@ .lm_header .lm_tab { padding-right: 20px; + margin-top: -1px; + border-bottom: 1px black; + .collectionDockingView-gear { + display: none; + } +} + +.lm_header .lm_tab.lm_active { + padding-right: 20px; + margin-top: 1px; + border-bottom: unset; + .collectionDockingView-gear { + display: inline-block; + } } .lm_popout { @@ -84,10 +98,7 @@ padding-left: 5px; height: 15px; width: 18px; - display: inline-block; margin: auto; - - display: none; } .collectionDockingView-dragAsDocument { diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 95b68a17d..533c8bffe 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -770,6 +770,10 @@ export class DockedFrameRenderer extends React.Component { private onActiveContentItemChanged() { if (this.props.glContainer.tab) { this._isActive = this.props.glContainer.tab.isActive; + setTimeout(() => { + const dv = this._document && DocumentManager.Instance.getFirstDocumentView(this._document); + dv && SelectionManager.SelectDoc(dv, false); + }); !this._isActive && this._document && Doc.UnBrushDoc(this._document); // bcz: bad -- trying to simulate a pointer leave event when a new tab is opened up on top of an existing one. } } diff --git a/src/client/views/collections/ParentDocumentSelector.tsx b/src/client/views/collections/ParentDocumentSelector.tsx index 532dd6abc..4c8cac3ed 100644 --- a/src/client/views/collections/ParentDocumentSelector.tsx +++ b/src/client/views/collections/ParentDocumentSelector.tsx @@ -129,7 +129,7 @@ export class DockingViewButtonSelector extends React.Component<{ views: () => Do this.props.views()[0]?.select(false); }} className="buttonSelector"> - + ; } diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx index 0168c825f..f5e0cd077 100644 --- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx +++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx @@ -711,12 +711,7 @@ export class PropertiesView extends React.Component { @undoBatch @action changeDash = () => { - const dash = this.dashdStk; - if (dash === "2") { - this.dashdStk = "0"; - } else { - this.dashdStk = "2"; - } + this.dashdStk = this.dashdStk === "2" ? "0" : "2"; } @computed get appearanceEditor() { @@ -769,9 +764,10 @@ export class PropertiesView extends React.Component { - {this.openActions ?
- -
: null} + {!this.openActions ? (null) : +
+ +
}
{
- {this.openSharing ?
- {this.sharingTable} -
: null} + {!this.openSharing ? (null) : +
+ {this.sharingTable} +
} - {this.isInk ?
-
runInAction(() => { this.openAppearance = !this.openAppearance; })} - style={{ backgroundColor: this.openAppearance ? "black" : "" }}> - Appearance -
- + {!this.isInk ? (null) : +
+
runInAction(() => { this.openAppearance = !this.openAppearance; })} + style={{ backgroundColor: this.openAppearance ? "black" : "" }}> + Appearance +
+ +
-
- {this.openAppearance ?
- {this.appearanceEditor} -
: null} -
: null} + {!this.openAppearance ? (null) : +
+ {this.appearanceEditor} +
} +
} {this.isInk ?
{ {this.fieldsCheckbox}
Layout
: null} - {this.openFields ? + {!this.openFields ? (null) :
{novice ? this.noviceFields : this.expandedField} -
: null} +
}
runInAction(() => { this.openLayout = !this.openLayout; })} style={{ backgroundColor: this.openLayout ? "black" : "" }}> Layout -
runInAction(() => { this.openLayout = !this.openLayout; })}> +
runInAction(() => { this.openLayout = !this.openLayout; })}>
-- cgit v1.2.3-70-g09d2