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

Don't zoom in when drawing a search polygon #902

Closed
jacobwod opened this issue Nov 11, 2021 · 5 comments
Closed

Don't zoom in when drawing a search polygon #902

jacobwod opened this issue Nov 11, 2021 · 5 comments
Assignees
Labels
Milestone

Comments

@jacobwod
Copy link
Member

Currently there's a bug in the spatial search tool that will zoom in on the map when user double-clicks (which is the way to end drawing a polygon). We don't want the zoom event to occur.

@jacobwod jacobwod added the bug label Nov 11, 2021
@jacobwod jacobwod added this to the 3.8 milestone Nov 11, 2021
@Hallbergs
Copy link
Member

This issue is a bit interesting... In the FmeServer-plugin the clicks are stopped without issues when stopClick is set to true. (StopClick is a setting in the draw constructor). But in the search plugin they are not. My guess is that we're dealing with a timing issue (in the FmeServer-plugin we have some logic running in the drawend-event which seems to run long enough to give the draw interaction enough time to stop the clicks).

@sweco-secoma @sweco-semara I saw that you were dealing with a similar issue in the geoSuite-plugin. Not sure this solution is better than yours, but i thought i should let you know how we fixed it in the search plugin anyways :)

@jacobwod
Copy link
Member Author

jacobwod commented Nov 11, 2021

@Hallbergs solution (setTimeout(() => { … }, 1);) is less code. Less code is better. 👍

@Hallbergs
Copy link
Member

But random timeouts throughout the application is scary 😯

@jacobwod
Copy link
Member Author

This is not random, it's exactly 1 ms! 😉

@sweco-secoma
Copy link
Contributor

Hi @Hallbergs , thanks for noticing and letting me know. Will be working on that next week so will see that i update it then. I think I had a comment there to look if there as a better way, so the suggestion is very welcome.

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

No branches or pull requests

3 participants