From 344598e8456693441083445cf6f90b420d5bc393 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 14 Apr 2020 10:40:23 +0200 Subject: [PATCH] loader.js: Wait for cols being painted prior adding class `impact` Allows for the new loading effect's transition to play correctly also for columns which get opened the first time. --- public/js/icinga/loader.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 8b73a3f11..c5ebe8283 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -299,7 +299,11 @@ this.requests[id] = req; } if (! autorefresh) { - req.$target.addClass('impact'); + setTimeout(function () { + // The column may have not been shown before. To make the transition + // delay working we have to wait for the column getting rendered + req.$target.addClass('impact'); + }, 0); } this.icinga.ui.refreshDebug(); return req;