From 26e94812b02e178ead5d5be7cfe5bf73e92ac875 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Wed, 13 May 2020 20:09:06 -0400 Subject: fixed map view doc references. changed doc view lock icon. made web box content @computed --- src/client/views/collections/CollectionMapView.tsx | 4 +++- src/client/views/nodes/DocumentView.tsx | 4 +++- src/client/views/nodes/WebBox.tsx | 9 +++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionMapView.tsx b/src/client/views/collections/CollectionMapView.tsx index 971224482..13c06b0a3 100644 --- a/src/client/views/collections/CollectionMapView.tsx +++ b/src/client/views/collections/CollectionMapView.tsx @@ -206,7 +206,8 @@ class CollectionMapView extends CollectionSubView render() { const { childLayoutPairs } = this; const { Document, fieldKey, active, google } = this.props; - let center = this.getLocation(Document, `${fieldKey}-mapCenter`, false); + const mapLoc = this.getLocation(this.rootDoc, `${fieldKey}-mapCenter`, false); + let center = mapLoc; if (center === undefined) { const childLocations = childLayoutPairs.map(({ layout }) => this.getLocation(layout, Doc.LayoutFieldKey(layout), false)); center = childLocations.find(location => location) || defaultLocation; @@ -246,6 +247,7 @@ class CollectionMapView extends CollectionSubView }} > {this.reactiveContents} + {mapLoc ? this.renderMarker(this.rootDoc) : undefined} ; diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 91275d89b..d821bb8ac 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -1165,7 +1165,9 @@ export class DocumentView extends DocComponent(Docu : this.innards} {(this.Document.isBackground !== undefined || this.isSelected(false)) && this.props.renderDepth > 0 && this.props.PanelWidth() > 0 ? -
this.toggleBackground(true)}>
+
this.toggleBackground(true)}> + +
: (null)} ; { this._showKPQuery ? : undefined; } diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index b0abb2479..6d4cc1a07 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -311,7 +311,8 @@ export class WebBox extends ViewBoxAnnotatableComponent; } - + return view; + } + @computed + get content() { + const view = this.urlContent; const decInteracting = DocumentDecorations.Instance?.Interacting; const frozen = !this.props.isSelected() || decInteracting; -- cgit v1.2.3-70-g09d2