From 5541c30f44a6a7b6023dbb7cf588fe8462466369 Mon Sep 17 00:00:00 2001 From: zsmj Date: Wed, 22 Jun 2022 10:39:30 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-11626=20refactor=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=AE=BD=E9=AB=98=E8=87=AA=E9=80=82=E5=BA=94=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=B8=83=E5=B1=80=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/editor/editor.text.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/widget/editor/editor.text.js b/src/widget/editor/editor.text.js index 554bf2286..fdc4545c8 100644 --- a/src/widget/editor/editor.text.js +++ b/src/widget/editor/editor.text.js @@ -28,15 +28,14 @@ BI.TextEditor = BI.inherit(BI.Widget, { var self = this, o = this.options; var border = o.simple ? 1 : 2; if (BI.isNumber(o.height)) { - this.element.css({height: o.height - border}); + this.element.css({ height: o.height - border }); } if (BI.isNumber(o.width)) { - this.element.css({width: o.width - border}); + this.element.css({ width: o.width - border }); } this.editor = BI.createWidget({ type: "bi.editor", simple: o.simple, - height: o.height - border, hgap: o.hgap, vgap: o.vgap, lgap: o.lgap, @@ -117,10 +116,14 @@ BI.TextEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.TextEditor.EVENT_EMPTY); }); BI.createWidget({ - type: "bi.vertical", - scrolly: false, + type: "bi.absolute", element: this, - items: [this.editor] + items: [ + { + el: this.editor, + inset: 0 + } + ] }); }, @@ -177,4 +180,4 @@ BI.TextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; BI.TextEditor.EVENT_REMOVE = "EVENT_REMOVE"; BI.TextEditor.EVENT_EMPTY = "EVENT_EMPTY"; -BI.shortcut("bi.text_editor", BI.TextEditor); \ No newline at end of file +BI.shortcut("bi.text_editor", BI.TextEditor);