-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Event Propagation in onPointerDrag #252
Comments
Do you really need it or do I have to waste my time only because someone has been checking my projects and looking for eventual bugs to try to convince me something? |
Don't try to make it look like you didn't notice that the line was underlined red. As far as I am concerned, everyone in the GIS sector seems to be a retarded criminal, I don't see any other explanation of how we got here. |
Thank you for your quick response and for providing a resolution to the problem. Your efforts are appreciated. Given that the fix has been implemented successfully, I wanted to kindly ask if you could consider publishing this update in the library. |
Hi there,
I'm encountering an issue with event propagation while using the onPointerDrag event in a RFeature component. I'm following an example from the documentation, but it seems that the example code includes a method called disablePropagation() on the RFeatureUIEvent object, which doesn't actually exist in the library. Consequently, I'm unable to prevent event propagation as intended.
onPointerDrag={useCallback((e) => { const coords = e.map.getCoordinateFromPixel(e.pixel); e.target.setGeometry(new Point(coords)); // This method doesn't exist on RFeatureUIEvent e.disablePropagation(); return false; }, [])}
I've tried using stopPropagation() which is available in RFeatureUIEvent and also preventDefault() as an alternative, but it doesn't fully address the issue. Could you please provide guidance on how to properly prevent event propagation in this context? I'd greatly appreciate any help or suggestions you can offer.
Thanks in advance!
The text was updated successfully, but these errors were encountered: