From 82d18af7e69a77b129e85d99aa88fc836d012684 Mon Sep 17 00:00:00 2001 From: Xintong Xia Date: Fri, 22 Nov 2019 15:06:51 -0800 Subject: [PATCH] Remove overwritten dotElement from geolocate control (#944) --- src/components/geolocate-control.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/components/geolocate-control.js b/src/components/geolocate-control.js index d21e5c4f..441ae4e5 100644 --- a/src/components/geolocate-control.js +++ b/src/components/geolocate-control.js @@ -96,7 +96,6 @@ export default class GeolocateControl extends BaseControl< _mapboxGeolocateControl: any = null; _geolocateButtonRef: {current: null | HTMLButtonElement} = createRef(); - _markerRef: {current: null | Marker} = createRef(); componentDidMount() { isGeolocationSupported().then(result => { @@ -105,14 +104,6 @@ export default class GeolocateControl extends BaseControl< }); } - componentDidUpdate() { - // MapboxGeolocateControl needs manipulate the style of Marker's container - const markerRef = this._markerRef.current; - if (this._mapboxGeolocateControl && markerRef) { - this._mapboxGeolocateControl._dotElement = markerRef._containerRef.current; - } - } - componentWillUnmount() { // re-implement MapboxGeolocateControl's _onRemove // clear the geolocation watch if exists @@ -235,7 +226,6 @@ export default class GeolocateControl extends BaseControl< // $FlowFixMe