Fix resetting cursor style (#2279)

This commit is contained in:
Xiaoji Chen 2023-09-12 10:15:23 -07:00 committed by GitHub
parent f903e44593
commit 2c0312e415
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -500,7 +500,7 @@ export default class Mapbox<
*/
_updateStyle(nextProps: MapboxProps<StyleT>, currProps: MapboxProps<StyleT>): boolean {
if (nextProps.cursor !== currProps.cursor) {
this._map.getCanvas().style.cursor = nextProps.cursor;
this._map.getCanvas().style.cursor = nextProps.cursor || '';
}
if (nextProps.mapStyle !== currProps.mapStyle) {
const {mapStyle = DEFAULT_STYLE, styleDiffing = true} = nextProps;