aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-03-18 22:13:52 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-03-18 22:13:52 -0400
commite89d98ead149bf241e9733a17ab3a5e336d2a121 (patch)
tree01e4b187fc99cf593ab0eb87c9cd2c01805c8b74
parent06c8ef45cd894af53ec9a388fe1a5fb664a274b9 (diff)
cleanup
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 2a29e5cb4..5e2f67ca5 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -37,6 +37,7 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
private _containerRef = React.createRef<HTMLDivElement>();
private _fullScreen: any = null;
private _flush: boolean = false;
+ private _ignoreStateChange = "";
constructor(props: SubCollectionViewProps) {
super(props);
@@ -105,20 +106,17 @@ export class CollectionDockingView extends React.Component<SubCollectionViewProp
newContentItem.callDownwards('_$init');
this._goldenLayout.root.callDownwards('setSize', [this._goldenLayout.width, this._goldenLayout.height]);
this._goldenLayout.emit('stateChanged');
- this.ignoreStateChange = JSON.stringify(this._goldenLayout.toConfig());
+ this._ignoreStateChange = JSON.stringify(this._goldenLayout.toConfig());
this.stateChanged();
return newContentItem;
}
- ignoreStateChange = "";
setupGoldenLayout() {
var config = this.props.Document.GetText(KeyStore.Data, "");
- if (config) {
- if (this.ignoreStateChange == config) {
- this.ignoreStateChange = "";
- return;
- }
+ var ignore = this._ignoreStateChange;
+ this._ignoreStateChange = "";
+ if (config && ignore != config) {
if (!this._goldenLayout) {
this._goldenLayout = new GoldenLayout(JSON.parse(config));
}