aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-12-08 22:48:46 -0500
committerbobzel <zzzman@gmail.com>2021-12-08 22:48:46 -0500
commitf8ce34c8ed42646691d1e392effe79bc27daf810 (patch)
tree7543c635f5c27fd73bb0a4d8f1be6a5119cfbcd9 /src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
parentf1d0a1f3849971be805924915a4ace7fecc55bda (diff)
Added auto scroll to bottom of map info view stack when note is added. hide resize handles for map view info window stack documents.
Diffstat (limited to 'src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx')
-rw-r--r--src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx6
1 files changed, 6 insertions, 0 deletions
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}