瀏覽代碼

HUE-3459 [assist] Fix issue with single panel in metastore and new editor

This also improves the snappiness when toggling panels.
Johan Ahlen 9 年之前
父節點
當前提交
08c230b75f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

+ 3 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1171,6 +1171,8 @@
         allExtrasHeight += $(extra).outerHeight(true);
       });
 
+      window.clearInterval($container.data('height_interval'));
+
       if (panelDefinitions().length === 0) {
         $allExtras.show();
         return;
@@ -1180,8 +1182,8 @@
           $allPanels.height($container.innerHeight() - allExtrasHeight);
         };
 
-        window.clearInterval($container.data('height_interval'));
         var heightAdjustInterval = window.setInterval(adjustHeightSingle, 800);
+        adjustHeightSingle();
         $container.data('height_interval', heightAdjustInterval);
 
         $(window).resize(adjustHeightSingle);