From fe4a45d0f63683c0f917b6e923e6d48b006e2701 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 31 Aug 2020 23:18:09 -0400 Subject: fixed addDocTab to not re-create the golden layout. fixed clicking tabs to register as an undo event. fixed color of links made in PDFs to be lightBlue. fixed default link behavior to be 'default' --- src/client/views/collections/CollectionDockingView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/views/collections/CollectionDockingView.tsx') diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 5f05b1193..d39ef5e80 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -197,6 +197,7 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { newContentItem.config.width = 50; } } + instance._ignoreStateChange = JSON.stringify(instance._goldenLayout.toConfig()); newContentItem.callDownwards('_$init'); } @@ -255,7 +256,7 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { new _global.ResizeObserver(this.onResize).observe(this._containerRef.current); this._reactionDisposer = reaction(() => StrCast(this.props.Document.dockingConfig), config => { - if (!this._goldenLayout || this._ignoreStateChange !== config) { + if (!this._goldenLayout || this._ignoreStateChange !== config) { // bcz: TODO! really need to diff config with ignoreStateChange and modify the current goldenLayout instead of building a new one. this.setupGoldenLayout(); } this._ignoreStateChange = ""; -- cgit v1.2.3-70-g09d2