diff options
| author | Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> | 2021-08-05 19:52:41 -0700 |
|---|---|---|
| committer | Aubrey-Li <63608597+Aubrey-Li@users.noreply.github.com> | 2021-08-05 19:52:41 -0700 |
| commit | ed1ec95a9172633cc14e4dcdac9b2fc3e0c29633 (patch) | |
| tree | 24b986b1518960517db9d7c5ee7be692068084a1 /src | |
| parent | 17e50d9e69c7d59c7d4c2be5c75c51b3e02bc698 (diff) | |
modify mapbox sidebar
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/views/nodes/MapBox/MapBox.tsx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx index 6447d9715..56203f3ae 100644 --- a/src/client/views/nodes/MapBox/MapBox.tsx +++ b/src/client/views/nodes/MapBox/MapBox.tsx @@ -78,6 +78,10 @@ export class MapBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps @observable private searchBox = new window.google.maps.places.Autocomplete(this.inputRef.current!, options); @observable private childDocs: MapMarker[] = []; + + @observable _showSidebar = false; + @computed get SidebarShown() { return this._showSidebar || this.layoutDoc._showSidebar ? true : false; } + static _canAnnotate = true; static _hadSelection: boolean = false; private _sidebarRef = React.createRef<SidebarAnnos>(); @@ -335,7 +339,8 @@ export class MapBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps rootDoc={this.rootDoc} layoutDoc={this.layoutDoc} dataDoc={this.dataDoc} - usePanelWidth={true} + showSidebar={this.SidebarShown} + nativeWidth={NumCast(this.layoutDoc._nativeWidth)} PanelWidth={this.sidebarWidth} sidebarAddDocument={this.sidebarAddDocument} moveDocument={this.moveDocument} |
