From 383e71a621824bd196ee019dd3239aa1ea80b888 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 11 Mar 2021 00:59:32 -0500 Subject: made text boxes span stackingview's when fitWidth or autoColumn is set. made doc decs fit stacking view docs properly when stack is viewScaled. increased default size of images when > 800 pixels. --- src/client/views/collections/CollectionStackingView.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/client/views/collections/CollectionStackingView.tsx') diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index a8123b051..b4a8974f0 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -30,6 +30,7 @@ import "./CollectionStackingView.scss"; import { CollectionStackingViewFieldColumn } from "./CollectionStackingViewFieldColumn"; import { CollectionSubView } from "./CollectionSubView"; import { CollectionViewType } from "./CollectionView"; +import { DocumentType } from "../../documents/DocumentTypes"; const _global = (window /* browser */ || global /* node */) as any; type StackingDocument = makeInterface<[typeof collectionSchema, typeof documentSchema]>; @@ -252,34 +253,34 @@ export class CollectionStackingView extends CollectionSubView lim === 0 ? this.props.PanelWidth() : lim === -1 ? 10000 : lim)(NumCast(this.layoutDoc.childLimitHeight, -1)); - const nw = Doc.NativeWidth(childLayoutDoc, childDataDoc) || (!childLayoutDoc._fitWidth || this.layoutDoc._columnsFill ? d[WidthSym]() : 0); - const nh = Doc.NativeHeight(childLayoutDoc, childDataDoc) || (!childLayoutDoc._fitWidth || this.layoutDoc._columnsFill ? d[HeightSym]() : 0); + const nw = Doc.NativeWidth(childLayoutDoc, childDataDoc) || (!childLayoutDoc._fitWidth ? d[WidthSym]() : 0); + const nh = Doc.NativeHeight(childLayoutDoc, childDataDoc) || (!childLayoutDoc._fitWidth ? d[HeightSym]() : 0); if (nw && nh) { const colWid = this.columnWidth / (this.isStackingView ? this.numGroupColumns : 1); const docWid = this.layoutDoc._columnsFill ? colWid : Math.min(this.getDocWidth(d), colWid); return Math.min( maxHeight, - docWid * nh / nw); + docWid * nh / nw) / (this.props.scaling?.() || 1);; } const childHeight = NumCast(childLayoutDoc._height); const panelHeight = this.props.PanelHeight() - 2 * this.yMargin; - return Math.min(childHeight, maxHeight, panelHeight); + return Math.min(childHeight, maxHeight, panelHeight) / (this.props.scaling?.() || 1);; } columnDividerDown = (e: React.PointerEvent) => { -- cgit v1.2.3-70-g09d2