aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionMapView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-13 16:43:50 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-13 16:43:50 -0400
commit87268612b9b765d74f1a5317b0894be0ceb1dfd1 (patch)
treea82ccfc8703af828a97d8772aaf5215a01fee449 /src/client/views/collections/CollectionMapView.tsx
parent516e59e0ff68fc812ab46f431afd2ef733c8a093 (diff)
fixed map view pointer events.
Diffstat (limited to 'src/client/views/collections/CollectionMapView.tsx')
-rw-r--r--src/client/views/collections/CollectionMapView.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionMapView.tsx b/src/client/views/collections/CollectionMapView.tsx
index b67daeb53..5075bbf7a 100644
--- a/src/client/views/collections/CollectionMapView.tsx
+++ b/src/client/views/collections/CollectionMapView.tsx
@@ -7,6 +7,7 @@ import { NumCast, StrCast } from "../../../new_fields/Types";
import { CollectionSubView } from "./CollectionSubView";
import { Utils } from "../../../Utils";
import { Opt } from "../../../new_fields/Doc";
+import "./CollectionMapView.scss";
type MapDocument = makeInterface<[typeof documentSchema]>;
const MapDocument = makeInterface(documentSchema);
@@ -25,11 +26,10 @@ class CollectionMapView extends CollectionSubView<MapDocument, Partial<MapProps>
center.lng = childLayoutPairs.length ? NumCast(childLayoutPairs[0].layout.locationLng, 0) : 0;
}
return (
- <div
- className={"collectionMapView-contents"}
- >
+ <div className={"collectionMapView-contents" + (this.props.active() ? "" : "-none")}
+ onPointerDown={e => (this.props.active() && e.button === 0 && !e.ctrlKey) && e.stopPropagation()} >
<Map
- {...props}
+ google={this.props.google}
zoom={NumCast(Document.zoom, 10)}
center={center}
initialCenter={center}