aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-06-09 16:58:53 -0400
committerbobzel <zzzman@gmail.com>2022-06-09 16:58:53 -0400
commit8ef0c6c08bd9c2e3654477b039686bab6b0ff991 (patch)
treecd06f17e057a47d72f5435c650c36adacb9eab1b /src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
parentdde011efbfc366dbc3bb04b52fdb6e30fcca37f5 (diff)
parentefb32ff12d94bff4474ac7ae57fbae754423a61a (diff)
Merge branch 'master' into mainview-jenny
Diffstat (limited to 'src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx')
-rw-r--r--src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx b/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
index db7dcb09d..bdf0f9d64 100644
--- a/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
+++ b/src/client/views/nodes/MapBox/MapBoxInfoWindow.tsx
@@ -45,11 +45,9 @@ export class MapBoxInfoWindow extends React.Component<MapBoxInfoWindowProps & Vi
_stack: CollectionStackingView | null | undefined;
-
- // Collection stacking view for documents in the infowindow of a map marker
- @computed get renderChildDocs() {
- return;
- }
+ childFitWidth = (doc:Doc) => doc.type === DocumentType.RTF;
+ addDoc = (doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).reduce((p, d) => p && Doc.AddDocToList(this.props.place, "data", d), true as boolean);
+ removeDoc = (doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).reduce((p, d) => p && Doc.RemoveDocFromList(this.props.place, "data", d), true as boolean);
render() {
return <InfoWindow anchor={this.props.markerMap[this.props.place[Id]]} onCloseClick={this.handleInfoWindowClose} >
<div className="mapbox-infowindow">
@@ -73,10 +71,10 @@ export class MapBoxInfoWindow extends React.Component<MapBoxInfoWindowProps & Vi
rootSelected={returnFalse}
childHideResizeHandles={returnTrue}
childHideDecorationTitle={returnTrue}
- childFitWidth={doc => doc.type === DocumentType.RTF}
+ childFitWidth={this.childFitWidth}
// childDocumentsActive={returnFalse}
- removeDocument={(doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).reduce((p, d) => p && Doc.RemoveDocFromList(this.props.place, "data", d), true as boolean)}
- addDocument={(doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).reduce((p, d) => p && Doc.AddDocToList(this.props.place, "data", d), true as boolean)}
+ removeDocument={this.removeDoc}
+ addDocument={this.addDoc}
renderDepth={this.props.renderDepth + 1}
viewType={CollectionViewType.Stacking}
pointerEvents={returnAll}