mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2025-07-24 01:39:59 +02:00
Antedit: support horizontal scrolling on horizontal tabbar
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -471,7 +471,18 @@ namespace OS {
|
||||
this.bindKey("ALT-F", () => this.menuAction("opendir"));
|
||||
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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user