Browse Source

HUE-4685 [editor] Loading a query has a big gutter which is smaller when you click it

Enrico Berti 10 năm trước cách đây
mục cha
commit
be05dc8

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
desktop/core/src/desktop/static/desktop/js/ace/ace.js


+ 6 - 8
tools/ace-editor/lib/ace/layer/gutter.js

@@ -219,14 +219,12 @@ var Gutter = function(parentEl) {
         var gutterWidth = gutterRenderer 
             ? gutterRenderer.getWidth(session, lastLineNumber, config)
             : lastLineNumber.toString().length * config.characterWidth;
-        
-        var padding = this.$padding || this.$computePadding();
-        gutterWidth += padding.left + padding.right;
-        if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {
-            this.gutterWidth = gutterWidth;
-            this.element.style.width = Math.ceil(this.gutterWidth) + "px";
-            this._emit("changeGutterWidth", gutterWidth);
-        }
+
+        gutterWidth += 6; // add some padding
+
+        this.gutterWidth = gutterWidth;
+        this.element.style.width = Math.ceil(this.gutterWidth) + "px";
+        this._emit("changeGutterWidth", gutterWidth);
     };
 
     this.$fixedWidth = false;

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác