aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx5
-rw-r--r--src/client/views/collections/CollectionView.tsx1
-rw-r--r--src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx6
3 files changed, 12 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index eddb97878..cdc680a08 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -178,6 +178,10 @@ export class CollectionStackingView extends CollectionSubView<StackingDocument,
return this.props.addDocTab(doc, where);
}
+ scrollToBottom = () => {
+ smoothScroll(500, this._mainCont!, this._mainCont!.scrollHeight);
+ }
+
focusDocument = (doc: Doc, options?: DocFocusOptions) => {
Doc.BrushDoc(doc);
@@ -244,6 +248,7 @@ export class CollectionStackingView extends CollectionSubView<StackingDocument,
focus={this.focusDocument}
docFilters={this.childDocFilters}
hideDecorationTitle={this.props.childHideDecorationTitle?.()}
+ hideResizeHandles={this.props.childHideResizeHandles?.()}
hideTitle={this.props.childHideTitle?.()}
docRangeFilters={this.childDocRangeFilters}
searchFilterDocs={this.searchFilterDocs}
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index f66bac20e..681a15e3d 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -76,6 +76,7 @@ export interface CollectionViewProps extends FieldViewProps {
childContextMenuItems?: () => { script: ScriptField, label: string }[];
childHideTitle?: () => boolean; // whether to hide the documentdecorations title for children
childHideDecorationTitle?: () => boolean;
+ childHideResizeHandles?: () => boolean;
childLayoutTemplate?: () => (Doc | undefined);// specify a layout Doc template to use for children of the collection
childLayoutString?: string;
childFreezeDimensions?: boolean; // used by TimeView to coerce documents to treat their width height as their native width/height
diff --git a/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx b/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
index e6f98e5cf..0d5fedb7b 100644
--- a/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
+++ b/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
@@ -37,11 +37,15 @@ export class MapBoxInfoWindow extends React.Component<MapBoxInfoWindowProps & Vi
const newBox = Docs.Create.TextDocument("Note", { _autoHeight: true });
FormattedTextBox.SelectOnLoad = newBox[Id];// track the new text box so we can give it a prop that tells it to focus itself when it's displayed
Doc.AddDocToList(this.props.place, "data", newBox);
+ this._stack?.scrollToBottom();
e.stopPropagation();
e.preventDefault();
});
}
+
+ _stack: CollectionStackingView | null | undefined;
+
// Collection stacking view for documents in the infowindow of a map marker
@computed get renderChildDocs() {
return;
@@ -51,6 +55,7 @@ export class MapBoxInfoWindow extends React.Component<MapBoxInfoWindowProps & Vi
<div className="mapbox-infowindow">
<div style={{ width: this.props.PanelWidth(), height: this.props.PanelHeight() }}>
<CollectionStackingView
+ ref={r => this._stack = r}
{...OmitKeys(this.props, ["NativeWidth", "NativeHeight", "setContentView"]).omit}
Document={this.props.place}
DataDoc={undefined}
@@ -66,6 +71,7 @@ export class MapBoxInfoWindow extends React.Component<MapBoxInfoWindowProps & Vi
isContentActive={returnTrue}
chromeHidden={true}
rootSelected={returnFalse}
+ childHideResizeHandles={returnTrue}
childHideDecorationTitle={returnTrue}
childFitWidth={doc => doc.type === DocumentType.RTF}
// childDocumentsActive={returnFalse}