Fix resetting cursor style (#2279)

This commit is contained in:
Xiaoji Chen 2023-09-12 10:15:23 -07:00 committed by Xiaoji Chen
parent 1f3b3edc99
commit ffb8d7daa8

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;