aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-03-25 20:57:22 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-03-25 20:57:22 -0400
commitd50415122ea6d4b87f1604fa4611553103fa2c18 (patch)
tree5037b5f932ade6703026c33f9eff7c6c16c85d27 /src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
parent786572f3cd674459f55b7f66e8eb257026f373ef (diff)
set max size for tab titles. fixed collection sizing when filter is expanded. fixed pivot view text height when small collection.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
index 637c81fe2..bd4db89ec 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
@@ -147,6 +147,7 @@ export function computePivotLayout(
const expander = 1.05;
const gap = .15;
+ const maxColHeight = pivotAxisWidth * expander * Math.ceil(maxInColumn / numCols);
let x = 0;
const sortedPivotKeys = pivotNumbers ? Array.from(pivotColumnGroups.keys()).sort((n1: FieldResult, n2: FieldResult) => toNumber(n1)! - toNumber(n2)!) : Array.from(pivotColumnGroups.keys()).sort();
sortedPivotKeys.forEach(key => {
@@ -189,7 +190,6 @@ export function computePivotLayout(
x += pivotAxisWidth * (numCols * expander + gap);
});
- const maxColHeight = pivotAxisWidth * expander * Math.ceil(maxInColumn / numCols);
const dividers = sortedPivotKeys.map((key, i) =>
({ type: "div", color: "lightGray", x: i * pivotAxisWidth * (numCols * expander + gap) - pivotAxisWidth * (expander - 1) / 2, y: -maxColHeight + pivotAxisWidth, width: pivotAxisWidth * numCols * expander, height: maxColHeight, payload: pivotColumnGroups.get(key)!.filters }));
groupNames.push(...dividers);
@@ -348,7 +348,7 @@ function normalizeResults(panelDim: number[], fontHeight: number, childPairs: {
y: gname.y * scale,
color: gname.color,
width: gname.width === undefined ? undefined : gname.width * scale,
- height: gname.height === -1 ? 1 : Math.max(fontHeight, (gname.height || 0) * scale),
+ height: gname.height === -1 ? 1 : gname.type === "text" ? Math.max(fontHeight * scale, (gname.height || 0) * scale) : (gname.height || 0) * scale,
fontSize: gname.fontSize,
payload: gname.payload
})));