aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-02-04 11:37:06 -0500
committerbob <bcz@cs.brown.edu>2020-02-04 11:37:06 -0500
commit471dce0623a751aed34f1cf69e022049a45e56bd (patch)
treeb21a761fa464d8ab99256df8705b06e447c629ea /src/client/views/collections/collectionFreeForm
parent72f50feacb1c023d093b8169ef85e1e7773aa483 (diff)
added defaults for mulitirow/col
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 6453cfe17..63544a637 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -824,13 +824,14 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
}
get doLayoutComputation() {
const { newPool, computedElementData } = this.doInternalLayoutComputation;
- Array.from(newPool.keys()).map(key => {
- const lastPos = this._cachedPool.get(key); // last computed pos
- const newPos = newPool.get(key);
- if (!lastPos || newPos.x !== lastPos.x || newPos.y !== lastPos.y || newPos.z !== lastPos.z || newPos.zIndex !== lastPos.zIndex || newPos.width !== lastPos.width || newPos.height !== lastPos.height) {
- runInAction(() => this._layoutPoolData.set(key, { transition: "transform 1s", ...newPos }));
- }
- });
+ runInAction(() =>
+ Array.from(newPool.keys()).map(key => {
+ const lastPos = this._cachedPool.get(key); // last computed pos
+ const newPos = newPool.get(key);
+ if (!lastPos || newPos.x !== lastPos.x || newPos.y !== lastPos.y || newPos.z !== lastPos.z || newPos.zIndex !== lastPos.zIndex || newPos.width !== lastPos.width || newPos.height !== lastPos.height) {
+ this._layoutPoolData.set(key, newPos);
+ }
+ }));
this._cachedPool.clear();
Array.from(newPool.keys()).forEach(k => this._cachedPool.set(k, newPool.get(k)));
this.childLayoutPairs.filter((pair, i) => this.isCurrent(pair.layout)).forEach(pair =>