Remove query spinner show delay because the spinner is not hidden

This commit is contained in:
Anton Khorev 2022-10-29 19:32:17 +03:00
parent a3acf9abc1
commit 357d32c57c

View file

@ -168,10 +168,6 @@ OSM.Query = function (map) {
$ul.empty(); $ul.empty();
$section.show(); $section.show();
$section.find(".loader").oneTime(1000, "loading", function () {
$(this).show();
});
if ($section.data("ajax")) { if ($section.data("ajax")) {
$section.data("ajax").abort(); $section.data("ajax").abort();
} }
@ -188,7 +184,7 @@ OSM.Query = function (map) {
success: function (results) { success: function (results) {
var elements; var elements;
$section.find(".loader").stopTime("loading").hide(); $section.find(".loader").hide();
if (merge) { if (merge) {
elements = results.elements.reduce(function (hash, element) { elements = results.elements.reduce(function (hash, element) {
@ -243,7 +239,7 @@ OSM.Query = function (map) {
} }
}, },
error: function (xhr, status, error) { error: function (xhr, status, error) {
$section.find(".loader").stopTime("loading").hide(); $section.find(".loader").hide();
$("<li>") $("<li>")
.addClass("query-result list-group-item") .addClass("query-result list-group-item")