aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-23 20:52:09 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-23 20:52:09 -0400
commita37559a417b8a19ee56ac3b2f5dd46ef70ca53a6 (patch)
tree4a022fce15d64724214dc327cc67b8c361cd663f /src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
parent8a8f2c8848fe76e26188666790accaf236267e78 (diff)
fixed loading of notes with template types. changed noteTypes to ["template-notes"]. Added pass through free form layout engine.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
index 0a5ea3baf..1ec0542a3 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
@@ -75,6 +75,28 @@ interface PivotColumn {
filters: string[];
}
+export function computerPassLayout(
+ poolData: Map<string, PoolData>,
+ pivotDoc: Doc,
+ childDocs: Doc[],
+ filterDocs: Doc[],
+ childPairs: { layout: Doc, data?: Doc }[],
+ panelDim: number[],
+ viewDefsToJSX: (views: ViewDefBounds[]) => ViewDefResult[]
+) {
+ const docMap = new Map<Doc, ViewDefBounds>();
+ childDocs.forEach((doc, i) => {
+ docMap.set(doc, {
+ type: "doc",
+ x: NumCast(doc.x),
+ y: NumCast(doc.y),
+ width: doc[WidthSym](),
+ height: doc[HeightSym](),
+ payload: undefined
+ });
+ });
+ return normalizeResults(panelDim, 12, childPairs, docMap, poolData, viewDefsToJSX, [], 0, [], childDocs.filter(c => !filterDocs.includes(c)));
+}
export function computerStarburstLayout(
poolData: Map<string, PoolData>,