aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-05 16:39:51 -0500
committerbobzel <zzzman@gmail.com>2021-03-05 16:39:51 -0500
commit54c88f5bae9238a9182cc654ffa476a08797cd1b (patch)
tree92dd10ce98b62bf43fe3a8e7258d8482a0a8d366
parent364b946e286533c2b30b80157cde8eebb2473c87 (diff)
fixed autoHeight gesture to not set nativewidth/height for text. fixed typo
-rw-r--r--src/client/views/DocumentDecorations.tsx2
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 1e3c0ba92..5b7394c42 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -479,7 +479,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
SelectionManager.Views().map(dv => {
const hgts = this._dragHeights.get(dv.layoutDoc);
if (hgts && hgts.lowest < hgts.start && hgts.lowest <= 20) {
- dv.effectiveNativeWidth > 0 && Doc.toggleNativeDimensions(dv.layoutDoc, dv.ContentScale(), dv.props.PanelWidth(), dv.props.PanelHeight());
+ dv.nativeWidth > 0 && Doc.toggleNativeDimensions(dv.layoutDoc, dv.ContentScale(), dv.props.PanelWidth(), dv.props.PanelHeight());
if (dv.layoutDoc._autoHeight) dv.layoutDoc._autoHeight = false;
setTimeout(() => dv.layoutDoc._autoHeight = true);
}
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index a6a26a001..660790b11 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1203,7 +1203,12 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
}
getAnchor = () => {
- df
+ const anchor = Docs.Create.TextanchorDocument({
+ title: StrCast(this.layoutDoc._viewType),
+ useLinkSmallAnchor: true,
+ hideLinkButton: true,
+ annotationOn: this.rootDoc
+ });
const proto = Doc.GetProto(anchor);
proto[ViewSpecPrefix + "_viewType"] = this.layoutDoc._viewType;
proto.docFilters = ObjectField.MakeCopy(this.layoutDoc.docFilters as ObjectField) || new List<string>([]);