]> git.openstreetmap.org Git - rails.git/commitdiff
Remove unused max_features parameter from feature warning
authorAnton Khorev <tony29@yandex.ru>
Tue, 28 Jan 2025 05:11:23 +0000 (08:11 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 28 Jan 2025 05:11:23 +0000 (08:11 +0300)
app/assets/javascripts/index/layers/data.js

index b972adbc2dc18f91c2bf72283ca731333c3ef158..5da57d4afb441928c0623aac0a24d6d54ff4b7d9 100644 (file)
@@ -44,7 +44,7 @@ OSM.initializeDataLayer = function (map) {
     }
   }
 
-  function displayFeatureWarning(count, limit, add, cancel) {
+  function displayFeatureWarning(num_features, add, cancel) {
     $("#browse_status").html(
       $("<div class='p-3'>").append(
         $("<div class='d-flex'>").append(
@@ -55,7 +55,7 @@ OSM.initializeDataLayer = function (map) {
               .attr("aria-label", I18n.t("javascripts.close"))
               .click(cancel))),
         $("<p class='alert alert-warning'>")
-          .text(I18n.t("browse.start_rjs.feature_warning", { num_features: count, max_features: limit })),
+          .text(I18n.t("browse.start_rjs.feature_warning", { num_features })),
         $("<input type='submit' class='btn btn-primary d-block mx-auto'>")
           .val(I18n.t("browse.start_rjs.load_data"))
           .click(add)));
@@ -120,7 +120,7 @@ OSM.initializeDataLayer = function (map) {
         if (features.length < maxFeatures) {
           addFeatures();
         } else {
-          displayFeatureWarning(features.length, maxFeatures, addFeatures, cancelAddFeatures);
+          displayFeatureWarning(features.length, addFeatures, cancelAddFeatures);
         }
 
         if (map._objectLayer) {