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

New note page on low zooms #5443

Merged
merged 17 commits into from
Jan 1, 2025

Conversation

AntonKhorev
Copy link
Collaborator

If

show a warning message and disable the submit button.

image

Fixes #1291 and another bug: note marker was disappearing together with notes layer when visible area became too large.

@AntonKhorev AntonKhorev force-pushed the new-note-marker-variable branch from 7c8e2f2 to 2a5ae1a Compare December 26, 2024 00:08
@AntonKhorev AntonKhorev changed the title New note marker variable New note page on low zooms Dec 26, 2024
app/assets/javascripts/index/new_note.js Outdated Show resolved Hide resolved
app/assets/javascripts/index/new_note.js Show resolved Hide resolved
app/assets/javascripts/index/new_note.js Outdated Show resolved Hide resolved
test/system/create_note_test.rb Show resolved Hide resolved
@AntonKhorev AntonKhorev force-pushed the new-note-marker-variable branch from 2a5ae1a to 927267d Compare December 31, 2024 22:36
newHalo() wasn't always creating new halos. It had an event type argument that was checked against drag event. Depending on this check, newHalo() could remove the halo.
@AntonKhorev AntonKhorev force-pushed the new-note-marker-variable branch from 927267d to 2353401 Compare December 31, 2024 22:54
This ensures that marker is always added/removed together with its halo.
It was also called from noteCreated() but that triggered page.unload() via OSM.router.route().
Same reasons as in the previous commit.
@AntonKhorev AntonKhorev force-pushed the new-note-marker-variable branch from 2353401 to fe8a87b Compare December 31, 2024 23:14
Note that addNoteButton.hasClass("active") check in page.load is useless because page.unload removes this class.
If not done, it's possible to lose the marker when starting from low zooms.
@AntonKhorev AntonKhorev force-pushed the new-note-marker-variable branch from fe8a87b to 27aa2ed Compare December 31, 2024 23:35
Copy link
Member

@tomhughes tomhughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks.

@tomhughes tomhughes merged commit eaa5f58 into openstreetmap:master Jan 1, 2025
22 checks passed
@AntonKhorev AntonKhorev deleted the new-note-marker-variable branch January 2, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

low zoom URLs for adding a note handled badly
2 participants