Antedit: support horizontal scrolling on horizontal tabbar

This commit is contained in:
lxsang 2022-07-05 22:23:38 +02:00
parent b8734fdc50
commit eb7162b901
11 changed files with 22 additions and 9 deletions

View File

@ -6,6 +6,7 @@ The editor functionality can be extended by its extension mechanism.
Extension can be developed/released/isntalled by the editor itself.
### Change logs
- 0.2.2-b: Support horizotal scrolling on horizotal tabbars
- 0.2.1-b: Add open file to right, editor actions are only attached to code editor
- 0.2.0-b: Support diff mode in editor + fix new Monaco version compatible bug
- 0.1.17-b: Fix extension keybinding bug with the new monaco editor

View File

@ -23,7 +23,7 @@
</afx-tab-container>
</afx-vbox>
<afx-resizer data-width = "3" ></afx-resizer>
<afx-vbox>
<afx-vbox data-id="editor-main-container">
<afx-hbox>
<afx-vbox data-id="left-panel">
<afx-tab-bar closable="true" data-height="26" data-id = "left-tabbar"></afx-tab-bar>

View File

@ -6,6 +6,7 @@ The editor functionality can be extended by its extension mechanism.
Extension can be developed/released/isntalled by the editor itself.
### Change logs
- 0.2.2-b: Support horizotal scrolling on horizotal tabbars
- 0.2.1-b: Add open file to right, editor actions are only attached to code editor
- 0.2.0-b: Support diff mode in editor + fix new Monaco version compatible bug
- 0.1.17-b: Fix extension keybinding bug with the new monaco editor

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "mrsang@iohub.dev"
},
"version": "0.2.1-b",
"version": "0.2.2-b",
"category": "Development",
"iconclass": "bi bi-journal-code",
"mimes": [

View File

@ -23,7 +23,7 @@
</afx-tab-container>
</afx-vbox>
<afx-resizer data-width = "3" ></afx-resizer>
<afx-vbox>
<afx-vbox data-id="editor-main-container">
<afx-hbox>
<afx-vbox data-id="left-panel">
<afx-tab-bar closable="true" data-height="26" data-id = "left-tabbar"></afx-tab-bar>

Binary file not shown.

View File

@ -7,7 +7,7 @@
"author": "Xuan Sang LE",
"email": "mrsang@iohub.dev"
},
"version": "0.2.1-b",
"version": "0.2.2-b",
"category": "Development",
"iconclass": "bi bi-journal-code",
"mimes": [

View File

@ -191,7 +191,6 @@ namespace OS {
return false;
}*/
if (!this.currfile.dirty) {
console.log("dirty", this.currfile.path);
this.currfile.dirty = true;
this.currfile.text += "*";
return this.tabbar.update(undefined);
@ -268,7 +267,8 @@ namespace OS {
this.currfile.selected = false;
file.selected = true;
//console.log cnt
this.tabbar.push(file);
const el = this.tabbar.push(file);
this.app.trigger("tab-opened", el);
}
/**

View File

@ -472,6 +472,17 @@ namespace OS {
this.bindKey("CTRL-S", () => this.menuAction("save"));
this.bindKey("ALT-W", () => this.menuAction("saveas"));
const list_container = $(".list-container", this.find("editor-main-container"));
list_container.each((i,el) => {
$(el).on("wheel", (evt)=>{
el.scrollLeft += (evt.originalEvent as WheelEvent).deltaY;
});
});
this.on("tab-opened", (el) => {
const container = $(el).closest(".list-container");
if(container && container[0])
container[0].scrollLeft = container[0].scrollWidth;
});
this.fileview.ondragndrop = (e) => {
if(!e.data.from || !e.data.to)
{

View File

@ -45,7 +45,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Antedit/README.md",
"category": "Development",
"author": "Xuan Sang LE",
"version": "0.2.1-b",
"version": "0.2.2-b",
"dependencies": ["MonacoCore@0.33.0-r"],
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Antedit/build/release/Antedit.zip"
},