[openstreetmap/openstreetmap-website] Delete button in Home location section of user profiles (PR #4149)
Anton Khorev
notifications at github.com
Fri Aug 11 18:35:21 UTC 2023
@AntonKhorev commented on this pull request.
> - var zoom = map.getZoom(),
- precision = OSM.zoomPrecision(zoom),
- location = e.latlng.wrap();
+ if (!$("#updatehome").is(":checked")) return;
+
+ var zoom = map.getZoom(),
+ precision = OSM.zoomPrecision(zoom),
+ location = e.latlng.wrap();
+
+ $("#home_lat").val(location.lat.toFixed(precision));
+ $("#home_lon").val(location.lng.toFixed(precision));
+
+ deleted_lat = null;
+ deleted_lon = null;
+ respondToHomeUpdate();
+ }).on("moveend", function () {
We are detecting if the map location is close enough to the inputs location. Then based on it we enable/disable the *show* button.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4149#discussion_r1291669282
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4149/review/1574199907 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230811/2c552e35/attachment.htm>
More information about the rails-dev
mailing list