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

HUE-3561 [editor] Take scroll top into account when resizing the editor

Johan Ahlen преди 9 години
родител
ревизия
410e480034
променени са 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

@@ -1388,6 +1388,7 @@
       var ace = options.ace;
       var $target = $(options.target);
       var $resizer = $(element);
+      var $rightPanel = $(".right-panel");
 
       var lastEditorSize = $.totalStorage('hue.editor.editor.size') || 128;
       var editorHeight = Math.floor(lastEditorSize / 16);
@@ -1415,7 +1416,7 @@
         start: options.onStart ? options.onStart : function(){},
         drag: function (event, ui) {
           autoExpand = false;
-          var currentHeight = ui.offset.top - 120;
+          var currentHeight = ui.offset.top + $rightPanel.scrollTop() - 120;
           $target.css("height", currentHeight + "px");
           ace().resize();
           ui.offset.top = 0;