Преглед на файлове

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

Enrico Berti преди 8 години
родител
ревизия
810f388
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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');
           }
         }