Scrolls all the way right on tab load

This commit is contained in:
Jacob Schatz 2017-07-23 12:23:35 -04:00
parent 4070d7deee
commit 403fdf7fc1
3 changed files with 11 additions and 2 deletions

View file

@ -179,6 +179,13 @@ const RepoHelper = {
};
},
scrollTabsRight() {
// wait for the transition. 0.1 seconds.
setTimeout(() => {
document.getElementById('tabs').scrollLeft = 12000;
}, 200)
},
dataToListOfFiles(data) {
const a = [];

View file

@ -55,6 +55,7 @@ export default class RepoSidebar {
// it works.
Helper.getContent(file, () => {
file.loading = false;
Helper.scrollTabsRight();
});
}
} else if (typeof file === 'string') {
@ -63,6 +64,7 @@ export default class RepoSidebar {
Service.url = url;
Helper.getContent(null, () => {
file.loading = false;
Helper.scrollTabsRight();
});
}
},

View file

@ -28,7 +28,7 @@
.panel-right {
display: inline-block;
width: 85%;
width: 80%;
.monaco-editor.vs {
.line-numbers {
@ -165,7 +165,7 @@
&.sidebar-mini {
display: inline-block;
vertical-align: top;
width: 15%;
width: 20%;
border-right: 1px solid $white-normal;
height: 80vh;
overflow: auto;