-
-
Notifications
You must be signed in to change notification settings - Fork 533
[BUG] "mousemove" is not working on drag but "pointermove" event will work #1149
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
Comments
I'm not sure switching to I don't recall <MyComponent>
<MapContainer style={{ position: 'relative' }}>
<MapElement data-tooltip-id="my-tooltip" data-tooltip-content="tooltip content" />
<Tooltip id="my-tooltip" float />
</MapContainer>
</MyComponent> I believe the "draggable" behavior should work the same as when scrolling an element. By default, the tooltip uses Just as a side note, you don't have to set it through the inline |
@gabrieljablonski Thanks you for helping with this issue
This is elements structure for
Actually I did the same thing in my Implementation by Adding Tooltip after Map Element but it is not moving while dragging MapElement |
From what I can tell, you'll have to place the tooltip component inside ZoomableGroup, which is also the element you will have to set the position attribute to relative. Try that and let me know the result. |
Tried by Putting What could be the other possible Solution ? 🤔💭 |
Can you provide a reproducible example? Either a repo or a CodeSandbox or similar. We might be able to help out by having one. Tried copying the code you posted, but couldn't figure out some of the stuff that's missing. |
Here is the working environment on code sandbox |
@dhruvsakariya your initial assessment about using An official release should be up soon. Feel free to use |
Thanks @gabrieljablonski for helping to resolve this issue |
Fix available on official version [email protected] |
Problem
When i am using "react-tooltip" with my "react-simple-maps" it is not moving when i start dragging around the map.
react-tooltip.mousemove.mp4
My Thought
After Looking into code base i have noticed that there is "mousemove" event is attatched for this work but it will not triggered when we start dragging. to also support dragging we need to replace this with "pointermove" event.
Describe alternatives
If there is any way to achive floating tooltip with other solution please show me that path and i am very thankful for that.
Additional context
Thanks you for spotting this issue
The text was updated successfully, but these errors were encountered: