2
0
mirror of https://github.com/esiur/iui.git synced 2025-06-27 09:23:12 +00:00
This commit is contained in:
2021-10-30 12:31:25 +03:00
parent b3479dbdbd
commit 1bac10e60d
10 changed files with 92 additions and 33 deletions

View File

@ -8,12 +8,10 @@ export default IUI.module(class CodePreview extends IUIElement {
async create() {
if (this.hasAttribute("debug"))
debugger;
this._code = this.innerHTML;
this._code = this.innerHTML.trim();
this.textContent = '';
// create elements
@ -31,7 +29,7 @@ export default IUI.module(class CodePreview extends IUIElement {
let self = this;
this.editor.addEventListener("input", function() {
self._code = self.editor.innerText;
self._code = self.editor.innerText.trim();
self.update();
}, false);

View File

@ -8,27 +8,27 @@ export default IUI.module(class IUIDialog extends IUIWindow
constructor()
{
super({
closeable: true,
resizeable: true,
draggable: false,
_dragging: false,
_expanding: false,
x: 0,
y: 0,
visible: false,
modal: false
}
);
super({
closeable: true,
resizeable: true,
draggable: false,
_dragging: false,
_expanding: false,
x: 0,
y: 0,
visible: false,
modal: false
}
);
var self = this;
var self = this;
this._register("visible");
this._register("resize");
this.on("close", function(){
self.hide();
});
this._register("visible");
this._register("resize");
this.on("close", function(){
self.hide();
});
}
create()