diff options
author | bobzel <zzzman@gmail.com> | 2020-08-30 00:13:33 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-30 00:13:33 -0400 |
commit | d6ed6bc7a368169b15b81b02d4daee67a92b05c4 (patch) | |
tree | e586bd55237396a444e646df61aee72b71e3fd1b | |
parent | d517d1e294f4123bd1b653d2fe3f747941905be8 (diff) |
fixed initialization of non-active tabs. fixed dragging of tab document icon.
-rw-r--r-- | src/client/views/collections/CollectionDockingViewMenu.tsx | 3 | ||||
-rw-r--r-- | src/client/views/collections/TabDocView.tsx | 27 |
2 files changed, 13 insertions, 17 deletions
diff --git a/src/client/views/collections/CollectionDockingViewMenu.tsx b/src/client/views/collections/CollectionDockingViewMenu.tsx index 4fe97452c..1cab293a8 100644 --- a/src/client/views/collections/CollectionDockingViewMenu.tsx +++ b/src/client/views/collections/CollectionDockingViewMenu.tsx @@ -36,9 +36,6 @@ export class CollectionDockingViewMenu extends React.Component<{ views: () => Do <span className="dockingViewButtonSelector" onPointerEnter={action(() => !this._ref.current?.getBoundingClientRect().width && (this._tooltipOpen = true))} onPointerDown={action(e => { - if (getComputedStyle(this._ref.current!).width !== "100%") { - e.stopPropagation(); e.preventDefault(); - } this.props.views()[0]?.select(false); this._tooltipOpen = false; })} > diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 36959f254..dd383fc32 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -361,19 +361,18 @@ export class TabDocView extends React.Component<TabDocViewProps> { } render() { - return !this._isActive ? (null) : - (<div className="collectionDockingView-content" ref={ref => { - if (this._mainCont = ref) { - (this._mainCont as any).InitTab = (tab: any) => this.init(tab, this._document); - DocServer.GetRefField(this.tab.contentItem.config.props.documentId).then(action(doc => doc instanceof Doc && (this._document = doc) && this.init(this.tab, this._document))); - } - }} - style={{ - transform: `translate(${this.previewPanelCenteringOffset}px, 0px)`, - height: this.layoutDoc?._fitWidth ? undefined : "100%", - width: this.widthpercent - }}> - {this.docView} - </div >); + return (<div className="collectionDockingView-content" ref={ref => { + if (this._mainCont = ref) { + (this._mainCont as any).InitTab = (tab: any) => this.init(tab, this._document); + this.tab && DocServer.GetRefField(this.tab.contentItem.config.props.documentId).then(action(doc => doc instanceof Doc && (this._document = doc) && this.init(this.tab, this._document))); + } + }} + style={{ + transform: `translate(${this.previewPanelCenteringOffset}px, 0px)`, + height: this.layoutDoc?._fitWidth ? undefined : "100%", + width: this.widthpercent + }}> + {this.docView} + </div >); } } |