diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-10-16 18:06:47 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-10-16 18:06:47 -0400 |
commit | c515eda623c7a440293acee6bbf1226b65ea0575 (patch) | |
tree | ca6bd63947a199f10e5e749cdd9588a819883a67 | |
parent | 1e8d0c5395e7a5760d8d759c237e808856d369a3 (diff) | |
parent | abf40af6dd617de6486a97e8b5f276db232119ed (diff) |
Merge branch 'master' into dataViz-annotations
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 3f23ee15a..bfc61f601 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -1511,10 +1511,12 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection } @observable _numLoaded = 1; + _lastPoolSize = 0; get doLayoutComputation() { const { newPool, computedElementData } = this.doInternalLayoutComputation; const array = Array.from(newPool.entries()); - let somethingChanged = false; + let somethingChanged = array.length !== this._lastPoolSize; + this._lastPoolSize = array.length; runInAction(() => { for (const entry of array) { const lastPos = this._cachedPool.get(entry[0]); // last computed pos |