Skip to content
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

Start draging with menu open #263

Open
meijer3 opened this issue Apr 14, 2023 · 4 comments
Open

Start draging with menu open #263

meijer3 opened this issue Apr 14, 2023 · 4 comments

Comments

@meijer3
Copy link

meijer3 commented Apr 14, 2023

Hi,

As UX point of view, I would like to be able to start drag/pan even with the menu open.
Now: open menu > drag outside > menu closes (and hightlight the page...)
Desired: open menu > direct panable (outside the menu ofcourse, and it may close)

2023-04-14 09-00-31

@jonataswalker
Copy link
Owner

Not clear to me how this "it may close" would work.

Are you able/willing to provide a PR?

@GastonZalba
Copy link
Contributor

I agree with that behavior and i can make a PR for this, but some questions:

Removing the line 307 will allow the popup to be closed on every click (dragging or not) and the event will propagate to the map (allowing dragging it... and maybe select a feature?). If this is ok, the fix it's quite easy.

If instead has to close and propagate only while dragging, i think the listener at 303 could be replaced with a map event (a singleclick), instead of the generic pointerdown. With the ol event it's easy to check the dragging event and allow the propagation only in that case. The only caveat with this is that the singleclick is delayed by 250 ms, so it will no be closed inmediatly.

@JakobMiksch
Copy link

I find this issue important as well.

@ztolley
Copy link

ztolley commented Mar 22, 2024

I have a similar ask, though in my case the map is tracking an item, when the item moves the map centre co-ordinates are updated to the target position. This seems to trigger the menu to close. Maybe we could add an optional argument defaulted to true named something like 'hideOnMove'. I'll try this on a local copy.

#282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants