-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default cursor behavior (flickering) #579
Comments
You can provide your own |
Great, so this is intended behavior (per repo authors). For anyone else wanting to fix/change this, I added this to
and copied |
@Pessimistress The docs still say that cursor only accepts a string: https://visgl.github.io/react-map-gl/docs/api-reference/map#cursor Had to dig up this issue to realize if I provide a custom cursor, that I also need to provide this custom fn. [EDIT] oh, so now I'm realizing all of this is outdated. The custom cursor example doesn't cover leaving in the place the default cursor behavior: Am I to assume we have to implement onDragStart, onDragEtc... to make this work normally again? |
@Pessimistress Any word here on how to preserve the default isDragging cursor handling and also use a custom cursor for layer features? For now, I'm not use the react-mapbox-gl cursor property and instead using an event handler with "onMouseMove", that sets the cursor manually on the canvas:
This preserves the default grab/grabbing behavior |
I'd like for the cursor to be the
-webkit-grab
type while it's over anything but a marker. And for it turn into apointer
when it's over a (clickable) marker.What I see instead is that the cursor flickers whenever it passes over a feature, though I'm not sure how
react-map-gl
defines a feature — it seems quite broadly. The relevant code in the repo is here. And here's a video I took of the behavior.The examples confuse me because the author explicitly sets the cursor to be a
crosshair
. When I disable the effect of that in DevTools, the examples behave similarly strangely (as shown in the video).Any insight into how to create the desired behavior?
Thanks,
Will
The text was updated successfully, but these errors were encountered: