소스 검색

[beeswax] Improve window sizing for assist

Johan Ahlen 9 년 전
부모
커밋
e2a1953
1개의 변경된 파일3개의 추가작업 그리고 15개의 파일을 삭제
  1. 3 15
      apps/beeswax/src/beeswax/templates/execute.mako

+ 3 - 15
apps/beeswax/src/beeswax/templates/execute.mako

@@ -1476,21 +1476,9 @@ $(document).ready(function () {
 
   initQueryField();
 
-  var resizeTimeout = -1;
-  var winWidth = $(window).width();
-  var winHeight = $(window).height();
-
-  $(window).on("resize", function () {
-    window.clearTimeout(resizeTimeout);
-    resizeTimeout = window.setTimeout(function () {
-      // prevents endless loop in IE8
-      if (winWidth != $(window).width() || winHeight != $(window).height()) {
-        resizeNavigator();
-        winWidth = $(window).width();
-        winHeight = $(window).height();
-      }
-    }, 200);
-  });
+  $(window).on("resize", resizeNavigator);
+
+  window.setInterval(resizeNavigator, 1000);
 
   function initQueryField() {
     if ($("#queryField").val() == "") {