aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/MapBox/MapBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/MapBox/MapBox.tsx')
-rw-r--r--src/client/views/nodes/MapBox/MapBox.tsx142
1 files changed, 68 insertions, 74 deletions
diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx
index 2d53116f3..2b3bcb0a2 100644
--- a/src/client/views/nodes/MapBox/MapBox.tsx
+++ b/src/client/views/nodes/MapBox/MapBox.tsx
@@ -255,88 +255,82 @@ export class MapBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps
}
render() {
- return <div className="mapBox" ref={this._ref}>
- {/* HELLO WORLD! */}
- <div className={"mapBox-contents"}
- style={{
- pointerEvents: this.isContentActive() ? undefined : "none"
- }}
- onWheel={e => e.stopPropagation()}
- onPointerDown={e => (e.button === 0 && !e.ctrlKey) && e.stopPropagation()} >
- {/* // {/* <LoadScript
+ return <div className="mapBox" ref={this._ref}
+ style={{ pointerEvents: this.isContentActive() ? undefined : "none" }} >
+ {/* // {/* <LoadScript
// googleMapsApiKey={process.env.GOOGLE_MAPS!}
// libraries={['places', 'drawing']}
// > */}
- <div className="mapBox-wrapper" style={{
- width: `calc(100% - ${this.sidebarWidthPercent})`
- }}>
- <GoogleMap
- mapContainerStyle={mapContainerStyle}
- zoom={this.zoom}
- center={this.center}
- onLoad={map => this.loadHandler(map)}
- options={mapOptions}
- >
- <Autocomplete
- onLoad={this.setSearchBox}
- onPlaceChanged={this.handlePlaceChanged}>
- <input ref={this.inputRef} className="searchbox" type="text" placeholder="Search anywhere:" />
- </Autocomplete>
-
- {this.childDocs.map(place => (
- <Marker
- key={place._markerId}
- position={place._latlngLocation}
- onLoad={marker => this.markerLoadHandler(marker, place)}
- onClick={e => this.markerClickHandler(e, place)}
- />
- ))}
- {this.infoWindowOpen && this.selectedPlace && (
- <InfoWindow
- anchor={this.markerMap[this.selectedPlace._markerId!]}
- onCloseClick={this.handleInfoWindowClose}
- >
- <div style={{ backgroundColor: 'white', opacity: 0.75, padding: 12 }}>
- <div style={{ fontSize: 16 }}>
+ <div className="mapBox-wrapper"
+ onWheel={e => e.stopPropagation()}
+ onPointerDown={e => (e.button === 0 && !e.ctrlKey) && e.stopPropagation()}
+ style={{ width: `calc(100% - ${this.sidebarWidthPercent})` }}>
+ <GoogleMap
+ mapContainerStyle={mapContainerStyle}
+ zoom={this.zoom}
+ center={this.center}
+ onLoad={map => this.loadHandler(map)}
+ options={mapOptions}
+ >
+ <Autocomplete
+ onLoad={this.setSearchBox}
+ onPlaceChanged={this.handlePlaceChanged}>
+ <input ref={this.inputRef} className="searchbox" type="text" placeholder="Search anywhere:" />
+ </Autocomplete>
+
+ {this.childDocs.map(place => (
+ <Marker
+ key={place._markerId}
+ position={place._latlngLocation}
+ onLoad={marker => this.markerLoadHandler(marker, place)}
+ onClick={e => this.markerClickHandler(e, place)}
+ />
+ ))}
+ {this.infoWindowOpen && this.selectedPlace && (
+ <InfoWindow
+ anchor={this.markerMap[this.selectedPlace._markerId!]}
+ onCloseClick={this.handleInfoWindowClose}
+ >
+ <div style={{ backgroundColor: 'white', opacity: 0.75, padding: 12 }}>
+ <div style={{ fontSize: 16 }}>
+ <div>
+ <img src="http://placekitten.com/200/300" />
+ <hr />
+ <form>
+ <label>Title: </label><br />
+ <input type="text" id="fname" name="fname"></input><br />
+ <label>Desription: </label><br />
+ <textarea style={{ height: 150 }} id="lname" name="lname" placeholder="Notes, a short description of this location, a brief comment, etc."></textarea>
+ </form>
+ <hr />
<div>
- <img src="http://placekitten.com/200/300" />
- <hr />
- <form>
- <label>Title: </label><br />
- <input type="text" id="fname" name="fname"></input><br />
- <label>Desription: </label><br />
- <textarea style={{ height: 150 }} id="lname" name="lname" placeholder="Notes, a short description of this location, a brief comment, etc."></textarea>
- </form>
- <hr />
- <div>
- <button>New link+</button>
- </div>
+ <button>New link+</button>
</div>
</div>
</div>
- </InfoWindow>
- )}
- </GoogleMap>
- </div>
- {/* {/* </LoadScript > */}
- <div className={"mapBox-sidebar"}
- style={{ width: `${this.sidebarWidthPercent}`, backgroundColor: `${this.sidebarColor}` }}>
- <SidebarAnnos ref={this._sidebarRef}
- {...this.props}
- fieldKey={this.annotationKey}
- rootDoc={this.rootDoc}
- layoutDoc={this.layoutDoc}
- dataDoc={this.dataDoc}
- usePanelWidth={true}
- PanelWidth={this.sidebarWidth}
- sidebarAddDocument={this.sidebarAddDocument}
- moveDocument={this.moveDocument}
- removeDocument={this.removeDocument}
- isContentActive={this.isContentActive}
- />
- </div>
- {this.sidebarHandle}
+ </div>
+ </InfoWindow>
+ )}
+ </GoogleMap>
+ </div>
+ {/* {/* </LoadScript > */}
+ <div className="mapBox-sidebar"
+ style={{ width: `${this.sidebarWidthPercent}`, backgroundColor: `${this.sidebarColor}` }}>
+ <SidebarAnnos ref={this._sidebarRef}
+ {...this.props}
+ fieldKey={this.annotationKey}
+ rootDoc={this.rootDoc}
+ layoutDoc={this.layoutDoc}
+ dataDoc={this.dataDoc}
+ usePanelWidth={true}
+ PanelWidth={this.sidebarWidth}
+ sidebarAddDocument={this.sidebarAddDocument}
+ moveDocument={this.moveDocument}
+ removeDocument={this.removeDocument}
+ isContentActive={this.isContentActive}
+ />
</div>
+ {this.sidebarHandle}
</div>;
}
} \ No newline at end of file