Skip to content

Commit

Permalink
Fix user location dot offset (#1220)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Nov 5, 2020
1 parent c86bfc7 commit 8e6e89b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/geolocate-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ export default class GeolocateControl extends BaseControl<
// $FlowFixMe
<Marker
key="location-maker"
className="mapboxgl-user-location-dot"
longitude={markerPosition.longitude}
latitude={markerPosition.latitude}
onContextMenu={e => e.preventDefault()}
captureDrag={false}
captureDoubleClick={false}
/>
>
<div className="mapboxgl-user-location-dot" style={{transform: 'translate(-50%, -50%)'}} />
</Marker>
);
};

Expand All @@ -298,7 +298,6 @@ export default class GeolocateControl extends BaseControl<
className={`mapboxgl-ctrl mapboxgl-ctrl-group ${className}`}
ref={this._containerRef}
style={style}
onContextMenu={e => e.preventDefault()}
>
{this._renderButton('geolocate', label, this._triggerGeolocate)}
</div>
Expand Down

0 comments on commit 8e6e89b

Please sign in to comment.