瀏覽代碼

HUE-7415 [editor] The editor textarea should retain its size on new query

Enrico Berti 8 年之前
父節點
當前提交
e735582
共有 1 個文件被更改,包括 1 次插入5 次删除
  1. 1 5
      desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

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

@@ -2047,12 +2047,8 @@
             }
             resized = true;
           }
-          else if (ace().session.getLength() > 8) {
-            $target.height((ace().session.getLength()) * 16);
-            resized = true;
-          }
           else {
-            $target.height(8 * 16);
+            $target.height(Math.max(ace().session.getLength() * 16, $.totalStorage('hue.editor.editor.size') || 131));
             resized = true;
           }
           if (ace().session.getLength() == editorHeight) {