Эх сурвалжийг харах

HUE-1176 [jb2] Remove graph arrows on tab hide

Enrico Berti 8 жил өмнө
parent
commit
beda97b6af

+ 10 - 0
apps/jobbrowser/src/jobbrowser/templates/job_browser.mako

@@ -901,6 +901,15 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
               }
             }
 
+            var arrowsPolling = function () {
+              if ($('#workflow-page-graph').is(':visible')){
+                window.setTimeout(arrowsPolling, 100);
+              }
+              else {
+                $('canvas').remove();
+              }
+            }
+
             $('canvas').remove();
 
             if (vm.job().type() === 'workflow') {
@@ -918,6 +927,7 @@ ${ commonheader("Job Browser", "jobbrowser", user, request) | n,unicode }
                 success: function (response) {
                   $('#workflow-page-graph').html(response);
                   updateArrowPosition();
+                  arrowsPolling();
                 }
               });
             }