From 23a1aa75cece7a9f2f45285b70e25294e833211c Mon Sep 17 00:00:00 2001 From: zsmj Date: Tue, 18 Oct 2022 17:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=20editor=E8=87=AA=E9=80=82?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/editor/editor.shelter.js | 24 ++++++++++-------------- src/case/editor/editor.state.js | 24 ++++++++++-------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/src/case/editor/editor.shelter.js b/src/case/editor/editor.shelter.js index 39def9d77..31883614c 100644 --- a/src/case/editor/editor.shelter.js +++ b/src/case/editor/editor.shelter.js @@ -58,17 +58,6 @@ BI.ShelterEditor = BI.inherit(BI.Widget, { height: o.height, hgap: o.hgap + 2 }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); this.text.on(BI.Controller.EVENT_CHANGE, function () { arguments[2] = self; self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); @@ -134,10 +123,17 @@ BI.ShelterEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments); }); BI.createWidget({ - type: "bi.vertical", - scrolly: false, + type: "bi.absolute", element: this, - items: [this.editor] + items: [ + { + el: this.text, + inset: 0, + }, { + el: this.editor, + inset: 0, + } + ] }); this._showHint(); self._checkText(); diff --git a/src/case/editor/editor.state.js b/src/case/editor/editor.state.js index e9d3900bd..8ed915716 100644 --- a/src/case/editor/editor.state.js +++ b/src/case/editor/editor.state.js @@ -77,17 +77,6 @@ BI.StateEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL); }); }); - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [{ - el: this.text, - left: 0, - right: 0, - top: 0, - bottom: 0 - }] - }); this.editor.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); }); @@ -143,10 +132,17 @@ BI.StateEditor = BI.inherit(BI.Widget, { self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments); }); BI.createWidget({ - type: "bi.vertical", - scrolly: false, + type: "bi.absolute", element: this, - items: [this.editor] + items: [ + { + el: this.text, + inset: 0, + }, { + el: this.editor, + inset: 0, + } + ] }); this._showHint(); if (BI.isNotNull(o.text)) {