-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
[FEATURE] Revert to using single onPanUpdate
to detect pan events
#1729
Comments
Hi @S-Man42, |
This is not part of v5 as I see it. I believe it was integrated a bit later... But I cannot do another major upgrade at the moment. I need a v5 solution, if possible... |
Ah, sorry, didn't see that you were still using v5. Can I ask why you are not using the flutter_map_dragmarker plugin? If there's a reason, maybe you can check the implementation there? The only thing I can think of off the top of my head as to why this changed is due to #1455, but that should have been available in and impacting v4 as well. |
Yes, you are right, I cross-checked: We were using v3.1.0, not 4 - sorry my fault.
I am currently trying. But my problem is, that I am using the flutter_map_marker_popup plugin for my markers. So I cannot see a way to combine both plugins to create a draggable popup marker. I am currently trying to implement an inherited PopupMarkerLayer with integrated code from the DragMarker plugin, but it seems not correct to me: Using one third-party lib code (DragMarker) to enhance a second third-party lib (PopupMarker) just to fix an issue of a third plugin (FlutterMap itself) whilst previously everything was fine... |
Ok, can you try what that PR recommends to fix the issue then and listen to |
Yes, I can listen to these events successfully. But the events do not what I want to, since they give me only delta x or delta y. So my markers will only be moved directly up/down or left/right. Yes, I could implement some workaround logic to recalculate the correct direction as the DragMarker plugin does. But do you really believe, that this is the smartest way? Using two independent events (plus need to store some start positions for the opposite directions, so in fact I need at least 4 events) which are not designed for this issues (as there are designed for one-directional issues as scrollbars or similar) to write some logic by manually detecting the touch point/cursor position and recalculate some behaviour which originally yet existed with onPanUpdate? I mean, pls have a look at the DragMarker plugin's code. This all is required to get this workaround running for something which already worked out-of-the-box. |
onPanUpdate
event is not called on layer anymore
Is there any progress? |
Have you tried this? |
Yes, we did (see my post above). But we did not came up with any proper solution, so we had do downgrade. We hoped very much for the upcoming changes and the PR... |
Unfortunately that PR is likely to take a little longer than planned. We're still considering the best way forward. There's also a good chance that that PR won't fix the issue. For now I believe this is the only way. The flutter_map_dragmarker doesn't seem to be that complex, it seems to just redirect both to the same listener methods. Is there any reason this doesn't work for you? https://github.com/ibrierley/flutter_map_dragmarker/blob/1e79d6bc9c9f3757d68545b24e15c99323c49ab2/lib/src/drag_marker_widget.dart#L64-L69 |
Hi, I am not quite sure, but you are pointing me to the Dragmarker plugin as at beginning of this thread, right? So please read thr discussion:
|
I'm not saying to use that plugin, I'm just saying it doesn't appear to be too hard to implement. Please see #1455 to find out why the |
onPanUpdate
event is not called on layer anymoreonPanUpdate
to detect pan events
What is the bug?
Since v4 I was able to create a marker which contained a GestureDetector as builder output. This GestureDetector included an onPanUpdate event which I used to enable dragging functionality. It worked fine a long time.
Now I upgraded FlutterMap to v5 and it came out, that exactly this event is not called anymore. Funny: All other events can be called as
onTap
or evenonVerticalDragUpdate
.Do you have an idea what changed and how could I restore this feature?
How can we reproduce it?
Do you have a potential solution?
No response
Platforms
Android, web, iOS
Severity
Obtrusive: Prevents normal functioning but causes no errors in the console
The text was updated successfully, but these errors were encountered: