Browse Source

HUE-6553 [frontend] Avoid redrawing of fixed headers if the editor size hasn't changed

Enrico Berti 8 years ago
parent
commit
810f388
1 changed files with 2 additions and 1 deletions
  1. 2 1
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

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

@@ -2016,9 +2016,10 @@
           if (ace().session.getLength() == editorHeight) {
             resized = false;
           }
-          if (resized) {
+          if (resized && $target.height() !== lastEditorSize) {
             ace().resize();
             editorHeight = Math.min(maxAutoLines, ace().session.getLength());
+            lastEditorSize = $target.height();
             huePubSub.publish('redraw.fixed.headers');
           }
         }