Etilène Jourdier
0f2df0b9ef
display an encouragement to contribute after many anonymous notes
...
create a counter of anonymous notes in a cookie, read by new note controller to display an encouragement to contribute in the already existing anonymous warning if the anonymous visitor has already created at least 10 anonymous notes. Cookie deleted on log-in and sign-up after email validation
2025-01-13 14:36:21 +03:00
Anton Khorev
27aa2ed591
Move new note marker to click location
...
If not done, it's possible to lose the marker when starting from low zooms.
2025-01-01 02:34:22 +03:00
Anton Khorev
5603309026
Decrease new note marker opacity when zoomed out
2025-01-01 02:34:22 +03:00
Anton Khorev
feb7af2020
Let page.load proceed when zoomed out, disabling submit
...
Note that addNoteButton.hasClass("active") check in page.load is useless because page.unload removes this class.
2025-01-01 02:32:06 +03:00
Anton Khorev
17ab002c04
Remove active class from addNoteButton only in page.unload()
...
Same reasons as in the previous commit.
2025-01-01 02:13:59 +03:00
Anton Khorev
5542858315
Call removeNewNoteMarker() only from page.unload()
...
It was also called from noteCreated() but that triggered page.unload() via OSM.router.route().
2025-01-01 02:13:59 +03:00
Anton Khorev
6cc31259e4
Add addNewNoteMarker() and removeNewNoteMarker() functions
...
This ensures that marker is always added/removed together with its halo.
2025-01-01 02:13:59 +03:00
Anton Khorev
4ea6077ddb
Convert newHalo() to addHalo() and removeHalo()
...
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.
2025-01-01 01:53:55 +03:00
Anton Khorev
f1835c914c
Move new note page.pushstate/popstate next to page.load
2024-12-31 23:47:55 +03:00
Anton Khorev
dc59b37fe1
Add new note marker to root map layer instead of noteLayer
...
We want the new note marker in the same layer with its halo. Also we don't want to put anything in noteLayer because it clears its contents on certain zoom levels.
2024-12-31 23:47:55 +03:00
Anton Khorev
18f3adbf5d
Remove unused return value of addCreatedNoteMarker()
...
This function adds a marker to notes layer. This controller doesn't need to do anything with markers of existing notes.
2024-12-31 23:46:29 +03:00
Anton Khorev
ae5b7812cc
Rename updateMarker() to addCreatedNoteMarker()
...
This function doesn't update any existing marker.
2024-12-31 23:46:29 +03:00
Anton Khorev
9d8ca8be11
Pass location instead of marker to createNote()
2024-12-31 23:42:40 +03:00
Anton Khorev
954eafd424
Move create note callback to button click handler
2024-12-31 23:37:34 +03:00
Anton Khorev
f169299b53
Don't pass url to createNote()
2024-12-31 23:25:11 +03:00
Anton Khorev
63a4f12550
Pass text instead of form to createNote()
2024-12-31 23:22:59 +03:00
Anton Khorev
fa0c12cdcd
Disable new note submit button in click handler
2024-12-31 23:02:47 +03:00
Anton Khorev
c4709e2a05
Rename newNote to newNoteMarker
2024-12-31 22:37:41 +03:00
Anton Khorev
f6141277d5
Remove unused timer from new note js controller
2024-11-13 15:54:20 +03:00
Tom Hughes
877867537b
Fix eslint warning
2022-04-18 14:23:02 +01:00
Tom Hughes
2f6eebcd97
Update to leaflet 1.8.0
2022-04-18 14:10:06 +01:00
Tom Hughes
79447e7549
Replace querystring parser with qs yarn module
2020-08-06 20:51:55 +01:00
Tom Hughes
6dd451c7ee
Stop creating a shared global querystring variable
2019-07-15 20:28:54 +01:00
Tom Hughes
a47c0a4411
Update querystring references
2019-07-15 10:03:09 +01:00
Tom Hughes
c4c0e8105a
Enforce consistent indentation in javascript code
2019-07-14 10:52:18 +01:00
Tom Hughes
5bd59e1936
Enable a number of eslint style rules
2019-04-07 17:02:39 +01:00
Tom Hughes
eb7678145a
Use double quotes consistently in javascript code
2019-04-06 15:59:34 +01:00
Tom Hughes
87127d41e9
Enable some more eslint rules from iD rules
2019-04-06 15:48:51 +01:00
Tom Hughes
4b0fed0aa4
Replace custom panning with new panInside leaflet method
2019-01-02 11:03:06 +00:00
Tom Hughes
4b43396ede
Rename 'clickable' to 'interactive' per leaflet 1.x change
2017-02-24 23:10:12 +00:00
Tom Hughes
8376a430b6
Allow context menu to add notes without panning the map
2017-02-12 19:19:14 +00:00
Dan Stowell
81d79f5e16
Simplify new-note marker placement - always in the centre
...
(This removes a tweak added in 40b3c82
, which we believe is
no longer relevant now the new-note dialogue is sidebar
rather than bubble.)
2015-08-09 10:56:22 +01:00
Tom Hughes
1596713871
Fix some JSHint complaints
2015-02-23 21:45:57 +00:00
Tom Hughes
e256c837b5
Eliminate templating from most javascript
2015-02-23 21:45:57 +00:00